title: JavaScript regex for checking number have % sign or not
body: <p>I have a input field, whether i want to input percent value or flat amount for this i have to check it has ends with % sign or not.</p>
  
  <p>sample input may be </p>
  
  <pre><code>12%
  12.888%
  12.00%
  12.00001%
  12.123344%
  </code></pre>
  
  <p>or for flat amount</p>
  
  <pre><code>100
  100.55252
  100.254575
  </code></pre>
  
  <p>something like this.</p>
  
  <p>N.B: I want to learn javascript regex ...have any suggestions?</p>