DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41287>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41287 Summary: Regular Expression problem Product: Regexp Version: unspecified Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P1 Component: Other AssignedTo: regexp-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] I have a typical problem that I have faced with the usage of Regular expression. We are using the RegExp jar to perform UI data format validations. There are typically two number formats that we are supposed to be using First is the US format of 999,999,999.99 and the second is Italian number format of 999.999.999,99 . The difference between the two formats is swapped usage of a dot and a comma. The regular expression that we are using for the US format is ^(\d{1,3}(,\d{3}) *)?(\.\d{1,2})?$ The regular expression that we are using for the Italian format is ^(\d{1,3} (.\d{3})*)?(\,\d{1,2})?$ Again swapped places of Dot and comma Now when I pass 2.222.222 to the US format regular expression, it returns a false (which is expected ) But when I pass 2,222,222 to the Italian format regular expression, it returns a true and the validation passes( unexpected ). I would think that since the code base is the same for the Match method, it should behave the same but it does not. I ratified that it is not our code which is causing the issue by using this applet available on the Apache website . http://jakarta.apache.org/regexp/applet.html I hope I am not bothering you too much and any help on this will be greatly appreciated ! -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]