Regular Expressions 101

Community Patterns

1...56789...900

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