Hi,
Maybe I kindof understand the problem wrongly, but wouldn't it be more simple to use two substitution regexes like this:
$foo =~ s/\n//gs && $foo =~ s/\)/)\n/g;
In reply to Re^2: Removing multiple newlines from a line using regex
by CowboyTim
in thread Removing multiple newlines from a line using regex
by fbicknel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |