Bug 42777 - Error while using RE.java
Summary: Error while using RE.java
Status: CLOSED WORKSFORME
Alias: None
Product: Regexp
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Sun Windows XP
: P2 major (vote)
Target Milestone: ---
Assignee: Jakarta Notifications Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-29 02:50 UTC by Bhushan
Modified: 2007-12-17 18:36 UTC (History)
0 users



Attachments
Attempt to reproduce the issue (304 bytes, text/plain)
2007-08-06 20:22 UTC, Henri Yandell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bhushan 2007-06-29 02:50:07 UTC
Hi All,

I am getting following error log while using RE.java through code,
I am overriding handleText() method of ParcerCallback,

chars is a string
I am getting error while dquoChar.subst(chars,"\"");
where dquoChar = new RE("\\&(l|r)dquo;?");


java.lang.StringIndexOutOfBoundsException: String index out of range: 15

        at java.lang.String.charAt(String.java:444)

        at
org.apache.regexp.StringCharacterIterator.charAt(StringCharacterIterator.java:90)

        at org.apache.regexp.RE.matchNodes(RE.java:1161)

        at org.apache.regexp.RE.matchAt(RE.java:1448)

        at org.apache.regexp.RE.match(RE.java:1540)

        at org.apache.regexp.RE.match(RE.java:1468)

        at org.apache.regexp.RE.subst(RE.java:1676)

        at org.apache.regexp.RE.subst(RE.java:1646)

        at
com.syntegra.sbs.bg.content.util.HTMLStripper.handleText(HTMLStripper.java:171)
Comment 1 Henri Yandell 2007-08-06 20:22:20 UTC
Created attachment 20606 [details]
Attempt to reproduce the issue

I tried to reproduce this, but couldn't. Presumably it is caused by the input
text. The original reporter may have to submit said text to show what the issue
is.
Comment 2 Vadim Gritsenko 2007-12-17 18:36:17 UTC
Please use release 1.5. If the problem persists, please provide more information
in this bug report.