What\'s the correct regex for a plus character (+) as the first argument (i.e. the string to replace) to Java\'s replaceAll method in the String class? I can\'t
replaceAll
Say you want to replace - with \\\-, use:
-
\\\-
text.replaceAll("-", "\\\\\\\\-");