>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]

Reply via email to