title: Regular Expression Quick Query
body: <p>Quick regular expressions question.</p>
  
  <p>I want an expression that will find the first digit in a line and also a word at the end of that line. (this will exclude any digits in there)</p>
  
  <p>IE if the string is, "12345hello" then I want the regular expression to find "1hello"</p>
  
  <p>Or even if it's "12345hel45667lo" to find the same thing.</p>
  
  <p>I have the first digit down but my expression I thought would work is:</p>
  
  <pre><code>print re.findall(r'^\d\D+',string)
  </code></pre>
  
  <p>This just gives me empty brackets, or the first digit if I take out the \D. What gives? </p>
  
  <p>Edit: If I put in a | for or then I get what I want sort of. Returns the words in the string along with the first digit but in separate groupings. I want it all in one. </p>