jakarta-oro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: Stack Overflow Problem
Date Mon, 10 Feb 2003 18:15:02 GMT

In message <3E47EA64.9585.FB4E4ED@localhost>, "Martin Thomas" writes:
>OK, I've attached a test case that demonstrates the problem.

Thanks.  Your original expression works just fine if you change (.)* to
(.*), even with the alternations and saved groups.  However, alternations
tend to be inefficient and should be replaced with character classes
whenever possible.  Contrary to my original assumption, the problem appears
to have had nothing to do with backtracking.  I don't think this is
a case of "blame the regular expression" as I had initially concluded.
There are situations where a Perl regex (at least a 5.003 regex) can
match the empty string an infinite  number of times.  That shouldn't
happen with (.)*, but neither should there be a problem with too many
saved groups being pushed onto the stack since there is only one.
I'm going to file this away as a test case and look into it later.

daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-user-help@jakarta.apache.org


Mime
View raw message