title: How to pass a RegEx expression as a parameter in Java?
body: <p>What is the easiest way to construct a java regular expression and pass it to a method that expects a String? Ideally something similar to <a href="https://stackoverflow.com/questions/11143702/how-to-pass-a-regular-expression-as-a-function-parameter">SO JavaScript solution here</a>.</p>
  
  <pre><code>System.out.println(System.getProperty(/* Regex here*/));
  </code></pre>