in reply to A complex recursive regex,help
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
|
|---|