Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<=\d)(?=(\d\d\d)+\b)
/
g

Description

The following regular expression can be used to insert commas as thousands delimiter. The pattern was taken from the http://www.dlang.org web site.

Submitted by Unknown - 8 years ago