in reply to
regex replacement help
You can remove the repeated substitutions by using the global modifier. If you want to have the tilda and a newline, just put that in your replacement:
s/(~+)/$1\n/g
Comment on
Re: regex replacement help
Download
Code
Replies are listed 'Best First'.
Re^2: regex replacement help
by
mkenney
(Beadle)
on Mar 29, 2011 at 19:08 UTC
That worked perfectly! Thanks!!!
[reply]
In Section
Seekers of Perl Wisdom