Open source software supply chain lighting plan, waiting for you>>>
Strings="$$";
s=s.replaceAll("\\s+\\$\\$","$$");
throw exception
java.lang.IllegalArgumentException: Illegal group
Use"\\$\\$"
in the second parameter:
Strings="$$";
s=s.replaceAll("\\s+\\$\\$","\\$\\$");
The$
is group symbol in regex’s replacement parameter
So you need to escape it
the second parameter also need to escape!
Similar Posts:
- java.lang.NullPointerException: println needs a me
- Ubuntu 18.04 lacks libgconf-2. So. 4
- When Linux configures Java environment variables, they still report Java: command not found
- Object deserialization, throw java.io.streamcorruptedexception: invalid type code: AC exception
- The problem of user.home environment variable in Java
- laravel No application encryption key has been specified
- AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
- java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log
- Java.lang.classnotfoundexception: com.mysql.cj.jdbc.driver can’t find jar package, path problem
- Listen eadrinuse: 8080 solution