my $a = "x|xx|xx|xxxx|xx|xxx|xx|xx|x"; 1 while ($a =~ s/\|xx\|/|x x|/); print "[$a]\n"; __DATA__ [x|x x|x x|xxxx|x x|xxx|x x|x x|x]
but as tachyon mentioned: what to do with the edge cases? (this method is not optimal by any means.)
-enlil
In reply to Re: A complex recursive regex,help
by Enlil
in thread A complex recursive regex,help
by OM_Zen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |