SyntaxFix
Write A Post
Hire A Developer
Questions
To include an optional minus sign and to disallow numbers like 015 (which can be mistaken for octal numbers) write:
015
-?(0|([1-9]\d*))(\.\d+)?