I am trying to remember the correct notation for performing find-replace regular expression matches in Java.
Say I have a line
String s = "My name is ''Eric'' and I have a bee called ''Eric'' and a fish called ''Wanda''."
I want to do something like the following:
s.replaceAll("\'\'$$\'\'", "$$");
To give: My name is Eric, and I have a bee called Eric and a fish called Wanda.
But I know that $$ is not the right notation to fix everything in '' and use it to replace the found match.
What specific notation am I looking for here?
Thanks in advance.
-Dave.
java regex
f1dave May 19 '11 at 11:14 2011-05-19 11:14
source share