$csv_regex = '{ \G(?:^|,) (?: # Either a double-quoted field . . . " # field opening quote ( [^"]*+ (?: "" [^"]*+ )*+ ) " # field closing quote | # . . . or . . . # . . . some non-quote/non-comma text . . . ( [^",]*+ ) ) }x'; ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl