Help for this page

Select Code to Download


  1. or download this
       s/$1//g if ($line =~ m/.*(\[.*\])\s.*/);
       s/$1/ /g if ($line =~ m/^\w.*(\s\s).*/);
    
  2. or download this
       $line =~ s/\[[^]]+\]//g;
       $line =~ s/\s+(?=\S)/ /g;
    
  3. or download this
       $line =~ s/ \[ .*? \] //gx;  # remove strings enclosed by "[..]"
       $line =~ s/ \s+ (\S) / $1/gx;  # normalize line-internal whitespace