Negative Number Regular Expression

Category: Numbers | Views Total: 39 views

A regular expression to match a negative number like -100, -200.5, etc.

/^-\d*\.?\d+$/

If you’re looking for a regular expression to match negative integers, use this regex instead:

^-\d+$

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply