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

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!!!