Please file an issue about this in Jira, ideally with a reference to
the canonical regular expression spec we should be using here.

On Tue, Jan 31, 2023 at 12:13 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?
>


-- 
Elliotte Rusty Harold
elh...@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org
For additional commands, e-mail: dev-h...@xalan.apache.org

Reply via email to