Hi All,
 
I am using the jakarta-oro-2.0.5.jar for the validation of Strings with
respect to the Regular Expression which we provide. In my case, whenever we
have more than one OR's present in the Regular Expression, it doesn't work
the way we think. It fails even though the String does maintain the Regular
Expression Condition.
 
For example :
Consecutive ORs in patterns are not handled correctly. The following
expression:
\d{3}[.]\d{2}[.]\d{2}|\d{3}[.]\d{2}|\d{3}
Does not work as it should and throws the error. When you put parenthesis in
to group the ORs like this: 
\d{3}[.]\d{2}[.]\d{2}|(\d{3}[.]\d{2}|\d{3}) 
it works fine.
 
I have seen a similar type bug being present in
http://issues.apache.org/bugzilla/show_bug.cgi?id=9253
<http://issues.apache.org/bugzilla/show_bug.cgi?id=9253>  for the 2.0.1
version. I see that opened somewhere in May 2002 and hasn't been yet closed.
Do anyone has any idea, whether this has been solved or not, and is there a
fix available for this in new builds? and if not, is there any workaround,
since in our cases we can't change change regular expression as such, as we
do have quite a few schemas for it.
 
If anyone has any information on it, please do suggest.
 
Thanks and Regads
Dev

Reply via email to