in reply to Re: Replace newlines only if not inside braces
in thread Replace newlines only if not inside braces
Is there a reason why you've put the \K within the group?
I suppose this does the same and is better readable!
$data =~ s<(?:{{.*?}})?\K\n>{<br>\n}gs; print $data;
Cheers Rolf
1) see or clause in Re: Replace newlines only if not inside braces for a work around
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Replace newlines only if not inside braces
by trizen (Hermit) on Feb 11, 2013 at 17:00 UTC | |
by LanX (Saint) on Feb 11, 2013 at 20:15 UTC | |
by trizen (Hermit) on Feb 11, 2013 at 21:47 UTC | |
|
Re^3: Replace newlines only if not inside braces
by 7stud (Deacon) on Feb 11, 2013 at 16:54 UTC |