title: Regex (Java) to remove all characters up to but not including (a number or a letter a-f followed by a number)
body: <p>I need help constructing the regular expression to <em>remove all characters up to but not including (a number or a letter a-f followed by a number)</em> in Java:</p>
  
  <p>Here's what I came up with (doesn't work):
  <code>string.replaceFirst(".+?(\\d|[a-f]\\d)","");</code></p>
  
  <p>That line of code replaces the entire string with an empty string.
  <code>.+?</code> is every character up to <code>\\d</code> a digit OR <code>[a-f]\\d</code> any of the letters a-f followed by a digit.</p>
  
  <p>This doesn't work, however, can I have some help?</p>
  
  <p>Thanks</p>
  
  <p>EDIT: changed <code>replace</code> with <code>replaceFirst</code></p>