Jun 01

You can use the Pattern classes quote method. It returns the literal pattern string for the specified string.

String literal = Pattern.quote(string);

written by objects \\ tags: , , , ,


Leave a Reply

You must be logged in to post a comment.