title: Easy way to convert regex to a java compatible regex?
body: <p>I have a regex defined in Python/Ruby/PHP that is like this</p>
  
  <pre><code>"(forumdisplay.php\?.*page=%CURRENTPAGE%)"
  </code></pre>
  
  <p>When I do it for Java, I have to double escape that question mark to <code>\\?</code></p>
  
  <p>Like so:</p>
  
  <pre><code>"(forumdisplay.php\\?.*page=%CURRENTPAGE%)";
  </code></pre>
  
  <p>Is there a function I can use to do that automatically? Or would I need to change all my regexes over to work with the Java regex engine?</p>