Help for this page

Select Code to Download


  1. or download this
    $s = "\tfred\tx\t\"abc\tdef\"\ty\tz\t";;
    
    ...
    
    print "'$s'";;
    '       fred***x        "abc***def"     y***z   '
    
  2. or download this
    s[
        (?<!^)  # not preceded by the start of string
    ...
        \t      # replace tabs
        (?!"|$) # that are also not followed by a double quote or the end 
    +of string
    ][***]gx;