Since Java 1.5, yes:
Pattern.quote("$5");
More Related Contents:
- How do i find the first un-escaped quotes in Java?
- Java – escape string to prevent SQL injection
- Escaping special characters in Java Regular Expressions
- Why String.replaceAll() in java requires 4 slashes “\\\\” in regex to actually replace “\”?
- How to escape a square bracket for Pattern compilation?
- Remove all occurrences of \ from string
- Find the highest number between two literal strings using a Regular Expression
- How to split a string, but also keep the delimiters?
- Using Regex to generate Strings rather than match them
- How to extract numbers from a string and get an array of ints?
- Java regex capturing groups indexes
- regex: How to escape backslashes and special characters?
- Regex to find whole words
- Can I replace groups in Java regex?
- Automatic reserved word escaping for Hibernate tables and columns
- How to add features missing from the Java regex implementation?
- Is Java RegEx case-insensitive?
- Java String.split() sometimes giving blank strings
- Constructing regex pattern to match sentence
- pattern.matcher() vs pattern.matches()
- How to handle requests that includes forward slashes (/)?
- java string split on all non-alphanumeric except apostrophes
- Find the first occurrence with Regex
- Java String ReplaceAll method giving illegal repetition error?
- Can java.util.regex.Pattern do partial matches?
- Find all words with 3 letters with regex
- How can split a string which contains only delimiter?
- Regular expression to get an attribute from HTML tag
- Java’s Scanner vs String.split() vs StringTokenizer; which should I use?
- java regex pattern unclosed character class