Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(([^,]*,){2})
/
gm

Description

i have paste \n after every 2-th comma using sed

sed 's/\(\([^,]*,\)\{2\}\)/\1\n/g'

Submitted by sanekmihailow - a year ago