Help for this page

Select Code to Download


  1. or download this
    $sentence =~ s/\b\Q$word\E\b\s+(?!.*\b\Q$word\E\b)//s;
    
  2. or download this
    String: the quick brown dog jumped the doggy style dog killing doggie 
    +eater.
    Result: the quick brown dog jumped the doggy style killing doggie eate
    +r.
    
  3. or download this
    $sentence =~ s/\s*\b\Q$word\E\b(?!.*\b\Q$word\E\b)//s;