title: How to regex match list of patterns in python
body: <p>I have list of patterns and I need to return that pattern if that is present in the given string else return None.
  I tried with the below code using re module , but I am getting only null in &quot;matches&quot; (when I tried to print matches).
  Completely new to corepython and regex,kindly help</p>
  <pre><code>import re
  patterns_lst=['10_TEST_Comments','10_TEST_Posts','10_TEST_Likes']
  
  def get_matching pattern(filename):
     for pattern in patterns_lst:
       matches = re.(pattern,filename)
     if matches:
        return matches
     else:
        return None
  
  print(get_matching pattern(&quot;6179504_10_TEST_Comments_22-Nov-2021_22-Nov-2021.xlsx&quot;))
  </code></pre>