title: Python regex: Reject one two-digit number and accept other two-digit numbers
body: <p>How can I make a regular expression to not match a certain number with more than 2 digits. for example any number but 13. The second line of code below wont work it will not match 10, 11,... either and the third line will look for a number not starting with 1 but having a 3:</p>
  
  <pre><code>str = 'val=13'
  
  regex = 'val=[^1][^3]'
  regex = 'val=[^13]
  
  re.search(regex, str)
  </code></pre>