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 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Additional Comments From [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
