Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
((?:[^,]*,){3})([^,]*)(,.*)
/
gx

Description

Change 3 to n - 1 to edit the nth column. Other minor modifications needed to edit the first or last column.

Submitted by Justin Hampton - 6 years ago