I asked jakarta-regexp-1.2 to test the string "111111" against the regexp pattern "^\d{0,5}(\.\d\d)?$". I believe this string should have failed, but the method org.apache.regexp.RE.match() returned "true" when it should have returned "false". I tested the same string using the ORO and GNU libraries - both agreed that this string should not match this pattern. I ran all examples under Windows 2000 using JDK 1.3.
I have found some associated problems with with the {n,m} notation. It doesn't appear to work correctly with 0 as a lower bound, and the upper bound allows one higher than it should. For the pattern: a(b{0,1})a Test String Matches Should Match aa false true aba true true abba true false abbba false false I got these results with Sun's Linux 1.3 SDK, and Win NT 1.3 SDK.
This is definitly a problem. Have not nailed down exactly why its happening though.
*** Bug 2487 has been marked as a duplicate of this bug. ***
*** Bug 14689 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 19329 ***
Fixed by Bug #19329