in reply to Re: Re: Parsing arguments
in thread Parsing arguments
BTW, benchmarks have shown using .*?D is slower than [^D]*D (where D is the delimiter).
Also note using [^\\] is not necessary, though harmless (since if the char is a backslash, the \\. will match unless the backslash is end the end, which case there's also no delimiter and the whole pattern will not match).
And finally, in your original you used the /s while you're not using it here.. I don't know if that's deliberate or a mistake, but I thought I'd note it.
•Update: and I just noticed you completely forgot support for the colon-delimiter (although that's not hard to add). Also that (?= \s* | \z ) zero-width assertion is completely futile since it also matches 0 chars (due to the \s*).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Parsing arguments
by hv (Prior) on Feb 20, 2003 at 19:55 UTC |