Regular Expressions 101

Community Patterns

Edit nth column of CSV

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 - 5 years ago