title: Match 0 to 100 or 0% to 100% using regex
body: <p>I'm trying to match the following, and i'm having a difficult time doing so.</p>
  
  <p>I want to allow 0 to 100, or 0% to 100%. In my textfield, i strip the % out, so if they put in 100, it won't fail at the regex and skip the strip.</p>
  
  <p>Therefore, i'd need a regex to allow 0 to 100 or 0% to 100%. 101 or 101% is invalid.</p>
  
  <p>Presently, i have the following</p>
  
  <pre><code>(?:^((\\%)?100(\\%)?$)|(?:^(\\%)?[0-9]{1,2}(\\%)?)((\\.|,)?[0-9]+)?$)
  </code></pre>
  
  <p>But that allows 101 but not 101%</p>
  
  <p>Please help! Any help would be greatly appreciated.</p>