title: Using regex with list comprehension in python
body: <p>I have following code which will store all the csv filename in a list from a specific folder</p>
  
  <pre><code>import pandas as pd
  import re
  import os
  
  files = os.listdir('.')
  filename=[filename for filename in files if filename.endswith('.csv')]
  </code></pre>
  
  <p>However, in my folder, I have two types of csv files, one ends with, for example, _20.cvs(or maybe _18.csv,_01.csv), another one ends with _Raw.csv; </p>
  
  <p>However I only need the first type stored in my list. I know regular expression may can help me on that, so I did some google search, and come up with the following code, but it seems doesn't work, can anyone offer a advice?</p>
  
  <pre><code>filename = [re.search(r'^\d{2}.csv'),filename).group(0) for filename in files] 
  </code></pre>