in reply to A complex recursive regex,help
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A complex recursive regex,help
by OM_Zen (Scribe) on Feb 06, 2003 at 01:07 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2003 at 01:44 UTC | |
by OM_Zen (Scribe) on Feb 06, 2003 at 04:45 UTC | |
by BrowserUk (Patriarch) on Feb 06, 2003 at 08:05 UTC |