reg ex for searching filenames : <p>I want to select the files, whose names ends with <code>_90.jpeg|_180.jpeg|_270.jpeg|_90.jpg|_180.jpg|_270.jpg</code>.</p>

<p>currently I am using the following approach</p>

<pre class="lang-py prettyprint-override"><code>pattern = re.compile('_90.jpeg|_180.jpeg|_270.jpeg|_90.jpg|_180.jpg|_270.jpg')
pattern.search(filename)
</code></pre>

<p>Is there any cleaner way to represent the _xxx.yyyy in regular expression. </p>
