Regular Expressions 101

Library entries

Currency amount validation with sign (cents optional)

Vote

1

Regular Expression
javascript

/
^(?:[$]|)[+-]?[0-9]{1,3}(?:[0-9]*(?:[.,][0-9]{2})?|(?:,[0-9]{3})*(?:\.[0-9]{1,2})?)$
/
gm

Description

Loading markdown...
Submitted by NatZol - a month ago