Hi, we use the regexp package version 1.3 in our webapplication to validate user inputs. One user input field has a max length of 4096 characters. So the following regexp is used: .{0,4096} and leads to this exception:
java.lang.ArrayIndexOutOfBoundsException: -16381 at org.apache.regexp.RE.matchNodes(Unknown Source) at org.apache.regexp.RE.matchAt(Unknown Source) at org.apache.regexp.RE.match(Unknown Source) at org.apache.regexp.RE.match(Unknown Source) at org.apache.regexp.RE.match(Unknown Source) at de.tcc_products.test.RegExpTester.main(RegExpTester.java:10) If I split up the regexp in a semantically similar regexp: (.{0,128}){0,32} everything works fine. Is this a bug or is something wrong with the regexp? This code snippet can be used to reproduce the error: package de.tcc_products.test; import org.apache.regexp.RE; public class RegExpTester { public static void main(String[] args) { RE regExp = new RE(".{0,4096}"); System.out.println("Matches: " + regExp.match("ABC")); } } Thx Jochen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]