Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

17

Regular Expression
PCRE (PHP <7.3)

/
(\d+)[^,]?+
/
gm

Description

Capture comma separated numbers, no matter if there are spaces before or after the commas.

Submitted by Fernando Nunes - 9 years ago