title: Match anything before a certain pattern
body: <p>I have string that can contain almost any character including <code>(_- %</code> and so forth. The string ends with <code>(\d{1,2})</code>. Eg. parenthesis with 1 or 2 digits. I now want 2 capturing groups, the 2 digits and everything before the parenthesis.</p>
  
  <p>currently I have:</p>
  
  <pre><code>final Pattern pattern = Pattern.compile("^([-%\\(\\)_/= a-zA-Z\\d]+)\\((\\d{1,2})\\)$");
  </code></pre>
  
  <p>But this does not match everything. I want to replace the char group with <code>.*</code> but not have it match the <code>(\d{1,2})</code> at end of string. How can I achieve this?</p>