How can I allow the user to input Numeric (with/without decimal point) only. OR numeric with 'K'/'B'
<p>I've been searching through Stack Overflow, but I can't get the right answer to my question.</p>

<p>How can I allow the user to input a number or number with 'K (Thousands)' or 'M (Millions)'?</p>

<p>I've tried using patterns, RegExp, etc.</p>

<p>Is there a regular expression for this? I tried using <code>^[0-9]*$</code> and also <code>^[0-9\K\M]*$</code>, but I don't know if it is the correct expression.</p>