while (<DATA>) {
$i=0 while s/\|\|/\| \|/g; # repeats as many times as is necessary
print;
}
As joost rightly says the forward lookahead operation is probably the best way to go.
use re 'debugcolor'
I'd love to find a solution using the 'c' modifier .. but then I'm not Abigail
--
Brother Frankus.
¤
In reply to Re: Regex Backtracking
by frankus
in thread Regex Backtracking
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |