That's an interesting technique.
The split() call normally captures everything that doesn't match the regex; in this case, it's the unquoted parts. You add on a capture in the regex, which tells split to also keep the separators; in this case, it's the quoted parts. The non-obvious part is that split will interleave the captures-in-separators and the usual non-separator portions properly.
--
[ e d @ h a l l e y . c c ]
In reply to Re: Re: Look Behind not work, please help
by halley
in thread Look Behind not work, please help
by donno20
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |