title: How to escape all regex special chars but not all at once (by Pattern.quote()), just one-by one
body: <p>Here's the problem: user is presented with a text field, unto which may he or she type the filter. A filter, to filter unfiltered data. User, experiencing an Oracle Forms brainwashing, excpets no special characters other than %, which I guess more or less stands for ".*" regex in Java.</p>
  
  <p>If the User Person is well behaved, given person will type stuff like "CTHULH%", in which case I may construct a pattern:</p>
  
  <pre><code>Pattern.compile(inputText.replaceAll("%", ".*"));
  </code></pre>
  
  <p>But if the User Person hails from Innsmouth, insurmountably will he type ".+\[a-#$%^&amp;*(" destroying my scheme with a few simple keystrokes. This will not work:</p>
  
  <pre><code>Pattern.compile(Pattern.quote(inputText).replaceAll("%", ".*"));
  </code></pre>
  
  <p>as it will put \Q at the beginning and \E at the end of the String, rendereing my % -> .* switch moot.</p>
  
  <p>The question is: do I have to look up every special character in the Pattern code and escape it myself by adding "\\" in front, or can this be done automagically? Or am I so deep into the problem, I'm omitting some obvious way of resolution?</p>