Java regex - escape special characters - like quotemeta
807601Jun 18 2008 — edited Jun 18 2008Hi
Is there a method in Java that is equivalent to Perl's "quotemeta"?
Basically I get a String input from user, and will remove them from a particular file. The problem is, the String.replaceAll accepts only regex as argument, and hence I have to supress/escape all the special characters like "(", ")", "*" etc.! Thats why I am looking for a method which can do this. Is there any? Kindly help.
Thanks
Sri