in reply to removing redundantwhitespace
$str =~ s/((^|\n| |\t)(?: |\t|(?<! |\t)\n)*)/$2/gs;
fixes most cases but doesn't convert a tab to a space if it is the first character in a white space string of characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: removing redundantwhitespace
by JadeNB (Chaplain) on Sep 13, 2008 at 21:33 UTC | |
by GrandFather (Saint) on Sep 13, 2008 at 22:03 UTC |