Regular Expressions 101

Community Patterns

finds places to put points or comas or separators between groups of 3 digits in long numbers

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=\d)(?=(?:\d\d\d)+(?!\d))
/
gm

Description

Help to read numbers in groups of three digits to count thousands, millions, thousands of millions, billions thousands of billions trillions thousands of trillions ... like the Avogadro's number or all the money spent by world to make weapons (used or not)

Submitted by anonymous - 2 years ago