Re: Illegal group reference
Posted by: Jai B
Date: January 19, 2006 09:53AM

I guess the problem is with java.util.regex.Matcher class throwing exception when the regex pattern contains '?' and value contains '$' symbol.
I assume your password had '$' which was the reason it might have been failing.

Try this simle java code:

String s1 = "hello ?";
String s = "rama$a";
System.out.println(s1.replaceFirst("\\?", s));

Options: ReplyQuote


Subject
Written By
Posted
December 27, 2005 11:31AM
Re: Illegal group reference
January 19, 2006 09:53AM
January 06, 2006 07:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.