|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: How to replace on a smooth way?by Ratazong (Prior) |
| on Apr 19, 2012 at 14:04 UTC ( #965968=note: print w/ replies, xml ) | Need Help?? |
|
You search for a §, followed with anything but a blank and store it to $1. Then you replace it by itself surrounded by brackets. The modifier g means that you do it as often as possible. Update: Thanks to i5513 and MidLifeXis for their improvements of my regex and for polishing my rusty knowledge! I like that in PerlMonks: by answering questions you often learn something for yourself, too :-)
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||