title: Function preg_match() for end of string matching
body: <p>I'm trying to check whether the last characters of <code>$url</code> are one of the following:</p>
  <p><code>.gif</code> <code>.png</code> <code>.bmp</code> <code>.jpg</code> <code>.jpeg</code></p>
  <p>It works fine for one of them:</p>
  <pre class="lang-php prettyprint-override"><code>if(!preg_match('/\.jpg$/', $url))
  </code></pre>
  <p>but putting them all together isn't working:</p>
  <pre class="lang-php prettyprint-override"><code>if(!preg_match('/[\.gif$\.png$\.bmp$\.jpg$\.jpeg$]/', $url))`
  </code></pre>
  <p>What am I doing wrong?</p>