How to escape text for regular expression in Java

Since Java 1.5, yes:

Pattern.quote("$5");

Leave a Comment