Help for this page

Select Code to Download


  1. or download this
    s/^\s+//;
    s{ [^\S\n]* (?: (\n)\s* | [^\S\n]+ ) }{ $1 || ' ' }gex
    
  2. or download this
    s{(?<=(\S))?\s+(?=(\S))?}{length($1.$2)?'':' '}gx
    
  3. or download this
    s{(?<=(\S))?\s+(?=(\S?))}{length(($1//'').$2)?'':' '}gx
    
  4. or download this
    s{(^)?\s+(\z)?}{$1//$2//' '}gx