in reply to Re: Look Behind not work, please help
in thread Look Behind not work, please help
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 ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Look Behind not work, please help
by jmcnamara (Monsignor) on Apr 30, 2003 at 15:32 UTC |