in reply to Re: split on unescaped delimiters
in thread split on unescaped delimiters

I'm not having much luck with the alternation code.

I think it'd have problems with 5 or 6 backslashes. What's more, since it matches the backslashes, it'd trim them off the end of the resulting split strings.

I'd better try that out and update...

DB<9> x @a= split /(?:\\\\X)|(?:(?<!\\)X)/, $escaped_str 0 '' 1 'a\\X\\\\b' 2 'c' 3 'd' DB<10> p $escaped_str Xa\X\\bXc\\XdX
Yes, the c gets striped