Hi Daniel, Thanks for your response. I could simulate this problem. Actually I was using only one instance of PatternCompiler, and multiple threads were trying to compile regular expression using the same instance of PatternCompiler. This lead to the exception that I had mentioned.
Thanks and Regards Prasad. -----Original Message----- From: Daniel F. Savarese [mailto:[EMAIL PROTECTED] Sent: Friday, August 27, 2004 8:17 PM To: ORO Users List Subject: Re: MalformedPatternException seen with OROMatcher regular expression library >I am using the OROMatcher regular expression library, which is bundled >with WebLogic Server. I am using com.oroinc.text.regex.PatternCompiler >to= compile a regular expression. I got the following exception :=0D >=0D >"com.oroinc.text.regex.MalformedPatternException: Unreached characters at >end of expression. Please report this bug!"=0D >=0D >The regular expression that I am trying to compile is :=0D >"/rack=3D([1-9][0-9]|[0-9])(/shelf=3D([1-9][0-9]|[1-9])(/slot= >=3D([1-9][0-9]|[1-9]) >(/sub_slot=3D([1-9][0-9]|[1-9]))?)?)?" I cannot reproduce the exception with that pattern using the latest version of Jakarta ORO. You should upgrade your code to use Jakarta ORO instead. It's just a matter of changing your imports. A utility program called oroToApache is provided in the tools directory to do that for you. That particular exception (with that message) should never be thrown, so there must have been a bug in the expression parsing code having to do with parentheses for that version of OROMatcher. Pat yourself on the back; I've never heard of it being thrown :) As an unrelated comment, I'd tweak the expression to replace each of the ([1-9][0-9])|[0-9]) instances with ([1-9]?[0-9]). Even though they're equivalent, the second expression evaluates matches faster. daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
