Hi, What is the best way to have the next release of Xalan include an updated regular expression library?
The one used has known errors as the sample program below shows. This error was fixed in version 1.4. https://bz.apache.org/bugzilla/show_bug.cgi?id=2121 <https://bz.apache.org/bugzilla/show_bug.cgi?id=2121> https://bz.apache.org/bugzilla/show_bug.cgi?id=19329 <https://bz.apache.org/bugzilla/show_bug.cgi?id=19329> My workaround is to remove the classes in package org.apache.regexp from the jar and add jar jakarta-regexp-1.5.jar to the project. Thanks, Jared > On Jan 31, 2023, at 12:12 PM, Jared Davis <jar...@davisprogramming.com> wrote: > > Hi, > > I've noticed an error in the regular expression jar that is included with > Xalan 2.7.3 RC9. > > import org.apache.regexp.RE; > public class ReBroken { > public static void main(String[] args) throws Exception { > RE re = new RE("a[A-CDE-G]"); > String test = "ABCDEFG"; > for (int ndx=0; ndx < test.length();ndx++) { > if (!re.match("a" + test.substring(ndx, ndx + 1))) { > System.out.println("ERROR Failed to match on " + > test.substring(ndx, ndx + 1)); > } else { > System.out.println(" OK match on " + > test.substring(ndx, ndx + 1)); > } > } > } > } > > ouputs > > OK match on A > OK match on B > OK match on C > ERROR Failed to match on D > OK match on E > OK match on F > OK match on G > > It should match on the D case. > > If I use jakarta-regexp-1.5.jar instead of the Xalan jar it works correctly. > > OK match on A > OK match on B > OK match on C > OK match on D > OK match on E > OK match on F > OK match on G > > > Is this the correct list to report this issue? >