I need help with some Regex, please. I'm trying to use Integromat to get some data, then parse it into a format suitable for a SQL INSERT command. Integromat uses Javascript regex.
The initial data looks like this:
Identifier,Handle,Type
CS18511,big-3-jersey,men's jerseys
CS185110231,big-3-jersey,men's jerseys
CS185110232,big-3-jersey,men's jerseys
CS185110233,big-3-jersey,men's jerseys
I want to apply regex substitution to achieve this format, ideally without the heading row.
('CS18511','big-3-jersey,men''s' jerseys'),
('CS185110231','big-3-jersey,men''s jerseys'),
('CS185110232','big-3-jersey,men''s jerseys'),
('CS185110233','big-3-jersey,men''s jerseys')
I've tried the below, which seems to group the items I want, but can't find a substitution that works to create the desired output.
((?=[^\s,])(?: ?[^[\s,]+|\[[^]]*])*|(?<=,|^)(?=\s*(?:,|$)))
Any help much appreciated!
Cheers