最佳答案
I am in need to replace
\\\s+\\$\\$ to $$
I used
String s = " $$";
s = s.replaceAll("\\s+\\$\\$","$$");
but it throws exception
java.lang.IllegalArgumentException: Illegal group reference