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 5923] - optional parament (?) eats input, causes expression after | not to match
Date Fri, 18 Jan 2002 20:14:20 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=5923>.
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=5923

optional parament (?) eats input, causes expression after | not to match

dfs@apache.org changed:

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



------- Additional Comments From dfs@apache.org  2002-01-18 12:14 -------
You are using matches() instead of contains().  contains()
and matches() are not the same.  Your sample Perl program
corresponds to a Java program that would use contains(), not
matches().  Please read the documentation for the matches()
method and also the perlre man page that comes with Perl 5.x to
understand why this is not a bug.  Look at the part
describing foo|foot to understand why a?|b and b|a? do
not match the same way.  Also, please inquire on
oro-user@jakarta.apache.org before reporting a bug
through Bugzilla.
Here's the relevant part of the perlre man page:
       Alternatives are tried from left to right, so the first
       alternative found for which the entire expression matches,
       is the one that is chosen. This means that alternatives
       are not necessarily greedy. For example: when matching
       `foo|foot' against "barefoot", only the "foo" part will
       match, as that is the first alternative tried, and it suc-
       cessfully matches the target string. (This might not seem
       important, but it is important when you are capturing
       matched text using parentheses.)

--
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