P is for Practical | |
PerlMonks |
Re: How do I insert a space after 30+ consecutive non-space characters?by amarceluk (Beadle) |
on May 23, 2002 at 14:45 UTC ( [id://168777]=note: print w/replies, xml ) | Need Help?? |
jmcnamara is right, of course. If I may venture some further explanation: Remember that character classes and ranges, like a-z and \s, represent any of a number of characters, and are only used in the "find" rather than the "replace" part of a regex. It's impossible to use \s in a replacement because \s could be any one of a space, \t, \n, \r, or \f. As jmcnamara demonstrated, you need to specify the exact character you want to use as the replacement.
In Section
Seekers of Perl Wisdom
|
|