Optionally match a + or – at the beginning, followed by one or more decimal digits, optional followed by a decimal point and one or more decimal digits util the end of the string:
/^[+-]?\d+(\.\d+)?$/
More Related Contents:
- How to deal with big numbers in javascript [duplicate]
- Get decimal portion of a number with JavaScript
- Regex for number with decimals and thousand separator
- Why does adding two decimals in Javascript produce a wrong result? [duplicate]
- Is there a reliable way in JavaScript to obtain the number of decimal places of an arbitrary number?
- Regex in JavaScript for validating decimal numbers
- Negative lookbehind equivalent in JavaScript
- Remove not alphanumeric characters from string
- How to convert string into float in JavaScript?
- How to write regex to validate dates?
- JavaScript displaying a float to 2 decimal places
- Replacing from javascript dom text node
- Replacing the nth instance of a regex match in Javascript
- How to extract a string using JavaScript Regex?
- JavaScript Regex Global Match Groups
- How can I put [] (square brackets) in RegExp javascript?
- Is there a decimal math library for JavaScript?
- Float sum with javascript [duplicate]
- Replacing accented characters with plain ascii ones [duplicate]
- Best way to parse HTML in Javascript
- How to insert space every 4 characters for IBAN registering?
- Regular Expression Pattern With A Variable
- 1.265 * 10000 = 126499.99999999999? [duplicate]
- javascript regex : only english letters allowed
- Regex JavaScript image file extension [closed]
- Javascript float subtract
- Javascript function need allow numbers, dot and comma
- Get text between two rounded brackets
- JavaScript: RegExp constructor vs RegEx literal
- Find and replace nth occurrence of [bracketed] expression in string