in reply to greedy search
If you think about it, there are only two reasonable choices for this: minimalist and maximalist (aka greedy) matching. In Perl (and every other regex syntax I know of) the default is to make the matching greedy; furthermore, Perl gives you the option to make the matching minimalist if that's what you want. As far as I can tell, this choice is arbitrary; it could have gone the other way.
But I'm just guessing here, and I could easily be wrong (i.e. there may be some fundamental reason for which maximalist matching is a more reasonable default than minimalist matching); if so, I look forward to being corrected.
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: greedy search
by ikegami (Patriarch) on Jun 03, 2005 at 18:57 UTC |