Help for this page

Select Code to Download


  1. or download this
    $line =~ s/^myword \S+//; # strip myword, a space, and any stretch of 
    +non-spaces
    
  2. or download this
    $line =~ s/^              #strip, from the beginning of the string,
               myword\s+      #myword, followed by whitespace
               \S+            #followed by non-whitespace
               (?:,\s*\S+)*   #followed by any number of comma, optional w
    +hitespace, non-whitespace
              //x;          # update: two slashes are needed here