title: How to ignore \n in regular expressions in python?
body: <p>So i have a regex telling if a number is integer.</p>
  
  <p><code>regex = '^(0|[1-9][0-9]*)$'</code></p>
  
  <pre><code>import re
  bool(re.search(regex, '42\n'))
  </code></pre>
  
  <p>returns True, and it is not supposed to?
  Where does the problem come from ?</p>