Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter \"$5\", I\'d like to match that exa
Since Java 1.5, yes:
Pattern.quote("$5");