emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible problem with looking-back function


From: Stephen J. Turnbull
Subject: Re: Possible problem with looking-back function
Date: Thu, 19 Aug 2010 18:02:24 +0900

Andreas Röhler writes:

 > that surprises me.  Check must be done against the string already
 > found.  So workload should grow lineary resp. slightly ascending.

That's incorrect.  In regexp matching abstractly defined, there is no
"string already matched."  In general backtracking must be done to get
a correct POSIX match, and it's potentially very expensive.  It would
be sometimes possible (as in this case) to identify a non-backtracking
algorithm as you suggest, but that would mean that different regexps
would be treated differently, or that some regexps would be
ridiculously expensive.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]