jakarta-oro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Jacobsen" <jerome.jacob...@gentootech.com>
Subject Perl5 and Alternate strange behavior
Date Tue, 05 Nov 2002 21:51:49 GMT
I have a Pattern like this:
Pattern pattern = compiler.compile("|STUFF");

I would expect both of the following to return true:
matcher.matches("", pattern);       // returns true
matcher.matches("STUFF", pattern);  // returns false!

However only the first returns true.  If I change my pattern to this:
Pattern pattern = compiler.compile("STUFF|");

Then both Perl5Matcher.matches() calls return true!

Am I misunderstanding something?


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

View raw message