title: Find a specific pattern (regular expression) in a list of strings (Python)
body: <p>So I have this list of strings:</p>
  
  <pre><code>teststr = ['1 FirstString', '2x Sec String', '3rd String', 'x forString', '5X fifth']
  </code></pre>
  
  <p>What I need to do, is to get all the elements from this list that contain:</p>
  
  <pre><code>number + "x" 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>number + "X"
  </code></pre>
  
  <p>For example if I have the function</p>
  
  <pre><code>def SomeFunc(string):
      #do something
  </code></pre>
  
  <p>I would like to get an output like this:</p>
  
  <pre><code>2x Sec String
  5X fifth
  </code></pre>
  
  <p>I found somewhere here in StackOverflow this function:</p>
  
  <pre><code>def CheckIfContainsNumber(inputString):
      return any(char.isdigit() for char in inputString)
  </code></pre>
  
  <p>But this returns each string that has a number.</p>
  
  <p>How can I expand the functions to get the desired output?</p>