in reply to Regex Backtracking

I think you want look-ahead matching here:
s/\|(?=\|)/\| /g;
See also perldoc perlre though I'll admit it's not the easiest of topics :-)
-- Joost downtime n. The period during which a system is error-free and immune from user input.

Replies are listed 'Best First'.
Re: Re: Regex Backtracking
by Anonymous Monk on Jun 12, 2002 at 16:45 UTC
    Thanks! Thats did the trick. BTW, I did try various combinations of  ?=, ?: and ?! but their usage wasn't very detailed in the Camel (at least not enough for regex illiterates like me) so my attempts weren't even close. I'll check out the perldoc perlre.