How to construct a pattern that escapes all metacharacters in java?
<p>I want to match pair of words where one of them changes constantly (loop over an array of strings). The problem is that this word may contain metacharacters and I don't know which ones, so escaping them manually is a bit problem. Is there a way to construct a pattern of a string that already escapes all its metacharacters in java?</p>
