Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^\d{1,3}((\.|\,|\s)\d{3})*((\.|\,|\s)\d{1,3})?$
/
gm

Description

Good for valid numbers for international currencies - checks for accepted variations for thousands and decimal separators

http://docs.oracle.com/cd/E19455-01/806-0169/overview-9/index.html

Submitted by Arlen Tees - 10 years ago