|
|
| There's more than one way to do things | |
| PerlMonks |
Re: replace at the beginingby Melly (Hermit) |
| on Aug 20, 2009 at 10:48 UTC ( #790051=note: print w/ replies, xml ) | Need Help?? |
|
The easiest way is to use a negative class (as noted below by others, this will only work when the error isn't the first thing on the line).
Alternatively, use a negative look-behind - (?<!foo):
Fixed the code - no \s as a replacement Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||