Hello, I'd like to pinpoint the place in an HTML document where the <body .....> tag closes. My first try, the regular expression
<html([\n\r\f]|.)*<body[^>]*(>) compiles but takes forever to match (and I actually mean forever...). Then I guessed that maybe a reluctant closure would provide the desired solution and I rewrote it to: <html([\n\r\f]|.)*?<body[^>]*?(>) The RECompiler however, crashes with an ArrayIndexOutOfBoundsException (stacktrace see below) Does anyone have an idea? Ciao Sven java.lang.ArrayIndexOutOfBoundsException at org.apache.regexp.RECompiler.setNextOfEnd(RECompiler.java:207) at org.apache.regexp.RECompiler.expr(RECompiler.java:1249) at org.apache.regexp.RECompiler.compile(RECompiler.java:1281) at org.apache.regexp.RE.<init>(RE.java:495) at org.apache.regexp.RE.<init>(RE.java:480) at navigation.AuxNav.setLocation(AuxNav.java:132) at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98 8) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90 4) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) My method, setLocation, does nothing but. public void setLocation (String location) { try { this.location = new RE (location); } catch (RESyntaxException e) { logger.error ("SyntaxException occured while parsing location String"); return; } this.originalLocation = location; } -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>