DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25985>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25985 In MATCH_MULTILINE-mode $ does not match end of line ------- Additional Comments From [EMAIL PROTECTED] 2004-01-09 04:15 ------- I think that match() doesn't work due to bug #4137. I've verified that the problem is gone when suggested fix for 4137 applied. But after this I get exception in subst() Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind ex out of range: -1 at java.lang.String.substring(String.java:1480) at org.apache.regexp.RE.subst(RE.java:1784) at Bug25985.main(Bug25985.java:9) It occured because we specify RE.REPLACE_BACKREFERENCES flag for subst(), but substitution parameter dosn't contain any such references. Thus we try to execute the following line: // Append everything after the last $ sign ret.append(substitution.substring(lLastPosition+2,lLength)); when lLength == 1 and lLastPosition == 0 (so, start position more then end one) To fix this problem we can just change default value of lLastPosition to -2 (so if there is no $ in substitution param we will add substitution itself) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]