title: using input() with regular expressions in python
body: <p>Is it possible to use an input() with regex</p>
  
  <p>I've written something like this</p>
  
  <pre><code>import re
  words = ['cats', 'cates', 'dog', 'ship']
  
  for l in words:
     m = re.search( r'cat..', l)  
     if m:
        print l
     else:
        print 'none'
  </code></pre>
  
  <p>this will return 'cates'</p>
  
  <p>But now I want to be able to use my own <code>input()</code> in ' <code>m = re.search( r'cat..', l)</code> '</p>
  
  <p>something like</p>
  
  <pre><code>import re
  words = ['cats', 'cates', 'dog', 'ship']
  
  target = input()
  
  for l in words:
     m = re.search( r'target..', l)  
     if m:
        print l
     else:
        print 'none'
  </code></pre>
  
  <p>this doesn't work of course (I know it will search for the word 'target' and not for the input()).
  Is there a way to do this or are'nt regular expressions not the solution for my problem?</p>