|
|
| "be consistent" | |
| PerlMonks |
Re^4: Replace newlines only if not inside bracesby LanX (Monsignor) |
| on Feb 11, 2013 at 20:15 UTC ( #1018234=note: print w/ replies, xml ) | Need Help?? |
|
$data =~ s<(?:{{.*?}}|[^\n])*\K\n>{<br>\n}gs; I think (didn't test it) that the * is two greedy, better *?.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||