title: Java Regex: How detect a URL with file extension
body: <p>How create a <strong>REGEX</strong> to detect if a "String url" contains a file extension (<em>.pdf,.jpeg,.asp,.cfm...</em>) ?</p>
  
  <p>Valids (without extensions):</p>
  
  <ul>
  <li><a href="http://www.yahoo.com" rel="nofollow">http://www.yahoo.com</a></li>
  <li><a href="http://dbpedia.org/ontology/" rel="nofollow">http://dbpedia.org/ontology/</a></li>
  <li><a href="http://www.rdf.com.br" rel="nofollow">http://www.rdf.com.br</a></li>
  </ul>
  
  <p>Invalids (with extensions):</p>
  
  <ul>
  <li><a href="http://www.thesis.com/paper.pdf" rel="nofollow">http://www.thesis.com/paper.pdf</a></li>
  <li><a href="http://pics.co.uk/mypic.png" rel="nofollow">http://pics.co.uk/mypic.png</a></li>
  <li><a href="http://jpeg.com/images/cool/the_image.JPEG" rel="nofollow">http://jpeg.com/images/cool/the_image.JPEG</a></li>
  </ul>
  
  <p>Thanks,
  Celso</p>