jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6838] - ORO hangs with regular expression in Perl5Util
Date Mon, 04 Mar 2002 19:49:25 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6838>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6838

ORO hangs with regular expression in Perl5Util

dfs@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From dfs@apache.org  2002-03-04 19:49 -------
The same thing happens with Perl 5.003_07 and Perl 5.6.  This is not a bug.
The problem, as often is the case, is with the regular expression.  You
have to remember, that regular expressions are finite state automata that
are not necessarily guaranteed to ever reach an end state during execution.
A single regular expressions cannot solve the matching nested parentheses
problem, which is analogous to what you are attempting.  A pattern better
approximating your intent, although still inefficient, might be:

String pattern =
"/<script[^>]*?>[^<]*?<!--.*(?!-->)top\\.location[^=]*?=[^']*?'([^']*?)'.*?-->.*?<\\/script>/";

If you change top.location.href=pfad to top.location.href='pfad' in your
getvalue2(), you will find that both foobar from getValue1() and pfad
from getValue2() are properly extracted.

Please ask for help on oro-user or oro-dev before reporting a bug.  It seems
like a majority of bugs reported through Bugzilla for jakarta-oro are not
bugs, but user error.  Asking on a mailing list before reporting a bug will
get faster results.

--
To unsubscribe, e-mail:   <mailto:oro-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:oro-dev-help@jakarta.apache.org>


Mime
View raw message