in reply to Re: Split unless contained by
in thread Split unless contained by
@b now contains:$a = "foo|{baz|qux}|fax"; @b = ($a =~ /( [^|\{]+ | \{ [^}]+ \} ) (?: \| | $ ) /xg);
Note that this regexp can't cope with recursive brackets, and can therefore be fooled. Any example of this would be:$VAR1 = [ 'foo', '{baz|qux}', 'fax' ];
$VAR1 = [ 'foo', 'baz', 'qu}x}', 'fax' ];
|
|---|