title: Python regex search range of numbers
body: <p>I couldn't seem to find a thread on this one, but it seems like something that should be pretty simple. I'm trying to use regex to search a line in an output for a number 0-99, and do one action, but if the number is 100 then it'll do a different action. Here's what I have tried(simplified version):</p>
  <pre><code>OUTPUT = #Some command that will store the output in variable OUTPUT
  OUTPUT = OUTPUT.split('\n')
  for line in OUTPUT:
      if (re.search(r&quot;Rebuild status:  percentage_complete&quot;, line)): #searches for the line, regardless of number
          if (re.search(&quot;\d[0-99]&quot;, line)): #if any number between 0 and 99 is found
              print(&quot;error&quot;)
          if (re.search(&quot;100&quot;, line)): #if number 100 is found
              print(&quot;complete&quot;)
  </code></pre>
  <p>I've tried this and it still picks up the 100 and prints error.</p>