Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=\d)(?=(?:\d{3})+\b)
/
g

Description

Add commas to large number to make it more readable.

Submitted by Karthik Kaasa - a year ago (Last modified a year ago)