title: Python regular expression searching for a number
body: <p>I'm new to regex, but looking through a string to find whether or not a pattern exists. </p>
  
  <p>I've tried using the following python code:</p>
  
  <pre><code>prog=re.compile('555.555.555')
  m=prog.match(somestring)
  if m: print somestring
  </code></pre>
  
  <p>I'm trying to find 3 groups of 5's separated by any number. This code doesn't return what I'm looking for though.</p>
  
  <p>Any suggestions?</p>
  
  <p>Edit:</p>
  
  <p>Here's some code to test a more basic version:</p>
  
  <pre><code>i,found=0,0
  while found==0:
      istr=str(i)
      prog=re.compile(r'1\d2\d3')
      m=prog.search(istr)
      if m:
          print i
          found=1
          break
      i=i+1
  </code></pre>
  
  <p>This returns 1312 rather than 10203</p>