See how you get on with this?
$s = "x|xx|xx|xxxx|xx|xxx|xx|xx|x"; $s =~ s[(x\|x)(x\|x)([x\|]*)][$1 $2$3]g; print $s; x|x x|xx|xxxx|xx|xxx|xx|xx|x
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
In reply to Re: A complex recursive regex,help
by BrowserUk
in thread A complex recursive regex,help
by OM_Zen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |