in reply to Do nothing? or Do something important in a very obscure way?
Well, let's look at it from the regex engine's point of view, executing 'xfoo' =~ m/x??:foo/;. First, it tries to match x zero times (since x? can match zero times, and x?? tells it to be non-greedy about it, it starts with zero, and backtraces up from there). That succeeds. Then, it tries to match foo, fails, and backtraces. But ohno, it can't backtrace. But what it can do is try matching the whole regex a little later (I'm not sure; does this count as backtracing past the ":"?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Do nothing? or Do something important in a very obscure way?
by BrowserUk (Patriarch) on Aug 23, 2002 at 08:50 UTC | |
by Anonymous Monk on Aug 23, 2002 at 10:58 UTC | |
by BrowserUk (Patriarch) on Aug 23, 2002 at 11:03 UTC | |
by theorbtwo (Prior) on Aug 23, 2002 at 09:00 UTC |