title: Regex to get the first number after a certain string followed by any data until the number
body: <p>I have a piece of data, retrieved from the database and containing information I need. Text is entered in a free form so it's written in many different ways. The only thing I know for sure is that I'm looking for the first number after a given string, but after that certain string (before the number) can be any text as well.</p>
  
  <p>I tried this (where <code>mytoken</code> is the string I know for sure its there) but this doesn't work.</p>
  
  <pre><code>/(mytoken|MYTOKEN)(.*)\d{1}/
  /(mytoken|MYTOKEN)[a-zA-Z]+\d{1}/
  /(mytoken|MYTOKEN)(.*)[0-9]/
  /(mytoken|MYTOKEN)[a-zA-Z]+[0-9]/
  </code></pre>
  
  <p>Even <code>mytoken</code> can be written in capitals, lowercase or a mix of capitals and lowercase character. Can the expression be case insensitive?</p>