Regular Expressions 101

Community Library

x

Us Currency Format with Length Limitation

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
(?!^\$0[1-9])(?=^(\$[0-9]+(\,[0-9]{3})*)+(\.[0-9]+)?$)^.{1,19}$|(?!^0[1-9])(?=^([0-9]+(\,[0-9]{3})*)+(\.[0-9]+)?$)^.{1,18}$
/

Description

Us Currency Format with Length Limitation optional(,)(.decimals)

Submitted by Renu Anil