title: Is there a simple way to switch between using and ignoring metacharacters in Python regular expressions?
body: <p>Is there a way of toggling the compilation or use of metacharacters when compiling regexes?  The current code looks like this:</p>
  
  <p><br>
  <strong>Current code:</strong></p>
  
  <pre><code>import re
  
  the_value  = '192.168.1.1'
  the_regex  = re.compile(the_value)
  
  my_collection = ['192a168b1c1', '192.168.1.1']
  
  my_collection.find_matching(the_regex)
  
  result = ['192a168b1c1', '192.168.1.1']
  </code></pre>
  
  <p><br></p>
  
  <p><strong>The ideal solution would look like</strong>:</p>
  
  <pre><code>import re
  
  the_value  = '192.168.1.1'
  the_regex  = re.compile(the_value, use_metacharacters=False)
  
  my_collection = ['192a168b1c1', '192.168.1.1']
  
  my_collection.find_matching(the_regex)
  
  result = ['192.168.1.1']
  </code></pre>
  
  <p>The ideal solution would let the <code>re</code> library handle the disabling of metacharacters, to avoid having to get involved in the process as much as possible.</p>