Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
195
rated 0 times [  199] [ 4]  / answers: 1 / hits: 97006  / 12 Years ago, sat, april 21, 2012, 12:00:00

i need a regular expression for decimal/float numbers like 12 12.2 1236.32 123.333 and +12.00 or -12.00 or ...123.123... for using in javascript and jQuery.
Thank you.


More From » regex

 Answers
203

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+)?$/


RegexPal


[#86101] Thursday, April 19, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
davonte

Total Points: 581
Total Questions: 101
Total Answers: 113

Location: Sudan
Member since Tue, Aug 3, 2021
3 Years ago
;