title: How to use RegEx to check if form input ends with .pdf
body: <p>So I have a text field on my web form, that users will use to enter a file path. I want to check if what is entered ends with .pdf </p>
  
  <p>I have been looking around, and it looks like RegEx is what I need to use to get multiple browser support, but I couldn't find a good example. </p>
  
  <p>HTML field</p>
  
  <pre><code>&lt;input type="text" name="filelocation" id="filelocation" placeholder="Must include .pdf file extension"&gt;
  </code></pre>