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 34309] - REMatcher freezes
Date Tue, 19 Apr 2005 03:55:24 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34309>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34309


dfs@apache.org changed:

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




------- Additional Comments From dfs@apache.org  2005-04-19 05:55 -------
I'm not marking this as invalid, because it is true that some regular
expressions will cause infinite backtracking.  That is an undesirable
behavior, even if it is more a symptom of the regular expression.
Perl5Matcher still is at heart compatible with the behavior of Perl 5.003,
which also exhibits the behavior.  Whenever we change the matching
behavior to be compatible with Perl 5.8, the problems will be resolved.
But first, sufficient demand for doing that work needs to surface, and
that is unlikely to happen given the incorporation of an official
regular expression package in the Java core.

Now, the reason we don't get distressed about this behavior is because
you can always improve your regular expression to eliminate the problem.
In your case, the problem is:
  private static final String E_ADDRESS_NAME = "(\\w|-)+((\\w|-|.)+)*";
Either you really mean:
  private static final String E_ADDRESS_NAME = "(\\w|-)+((\\w|-|\\.)+)*";
or
 private static final String E_ADDRESS_NAME = "(\\w|-)+(.+)*";
Neither of these expressions causes infinite backtracking.  Use
whichever you intend to correct the issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message