A
April
Non-greedy '.*?' --
the code took:0.03332 wallclock secs ( 0.03 usr + 0.00 sys = 0..03 CPU)
Greedy '[^\w.-]*' --
the code took:0.016902 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU)
impressive!
Non-greedy '.*?' --
the code took:0.03332 wallclock secs ( 0.03 usr + 0.00 sys = 0..03 CPU)
Greedy '[^\w.-]*' --
the code took:0.016902 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU)
A> ? seems a pretty interesting quatifier in re. it relates to both
A> optional and non-greedy.
that is wrong thinking. one is a quantifier (0 or 1 of the previous
thing). the other is a modifier (makes the previous quantifier
non-greedy). don't assume any sort of relationship because of the use of
? for both of those roles.
Uri said:A> ? seems a pretty interesting quatifier in re. it relates to both
A> optional and non-greedy.
that is wrong thinking. one is a quantifier (0 or 1 of the previous
thing). the other is a modifier (makes the previous quantifier
non-greedy). don't assume any sort of relationship because of the use of
? for both of those roles.
<yes, i am back!
verizon screwed over my usenet feed and i finally
switched to a free text one>
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.