in reply to Re: Regex is eating up whitespace
in thread Regex is eating up whitespace
I ended up coming up with this, which seems to work fine and avoids previously tagged cases, but the anchored version is better.
$text =~ s/(\bS\.(?=\s))/\<\1=initial\>/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex is eating up whitespace
by GrandFather (Saint) on Sep 29, 2008 at 23:49 UTC | |
|
Re^3: Regex is eating up whitespace
by dragonchild (Archbishop) on Sep 30, 2008 at 13:18 UTC |