Skip to main content
Nintex Community Menu Bar
Question

Replace semicolon in quotes

  • December 30, 2022
  • 1 reply
  • 177 views

Forum|alt.badge.img

I need to parse CSV file which is semicolon delimited in Nintex workflows. The lines will be splitted by ; which is not an issue.

However, there are escaped semicolons - that means they are wrapped in quotes example:

column1;column2;"column3; stillcolumn 3";column4 

I have a regex which can find a match - but it will find only 1 match. How to force Nintex to get/replace all occurrences?

Regex:

("[^";]*);([^"]*";) 

In .NET it is Regex.Matches, in JS there is an option /g but I do not know about any option in Nintex (except running this regex in a loop).

1 reply

bamaeric
Forum|alt.badge.img+14
  • Apprentice
  • January 3, 2023

Try this regular expression:

 

(?m);(?=[^"]*"(?:[^"\r\n]*"[^"]*")*[^"\r\n]*$)