How to create custom regex pattern in java script : <p>I have text box that can accept only numbers (floated number too (1.5 or 2.5 like this) with percentage symbol at end of the number but this % symbol not mandatory it an optional. I want do this using regular expression in javascript.</p>
