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...
Yes, the c gets stripedDB<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
In reply to Re: Re: split on unescaped delimiters
by bsb
in thread split on unescaped delimiters
by bsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |