Ignoring a delimiter in a string between ()

In Alteryx I need to parse a string that is ; delimited, but the data is constructed in a way that there are extra ; between brackets () when there are multiple outputs.

I found this expression for RegEx (;)+(?![^{]}) which would work if the ; was between {} but I can’t figure out how to sub out () to make it work.

Data strings look like Corp Other Matters (Board; Mgmt); Board (Replace); Strategy(Change) Corp Other Matters (Board); Strategy (Change; Shift)

I’d like an output with Corp Other Matters (Board; Mgmt) Board (Replace) Strategy(Change) Corp Other Matters (Board) Strategy (Change; Shift)

Bonus points if there’s a way to then create entries for Corp Other Matters (Board) Corp Other Matters (Mgmt)

1 Answer

Use the Text To Column tool with configuration below:

  • Delimiter ;
  • Split to columns 4
  • Check the box "Ignore delimiters in parentheses"

Then use the Formula tool to concatenate the 4 string fields.

Input: Corp Other Matters (Board; Mgmt); Board (Replace); Strategy(Change) Corp Other Matters (Board); Strategy (Change; Shift)

Output: Corp Other Matters (Board; Mgmt) Board (Replace) Strategy(Change) Corp Other Matters (Board) Strategy (Change; Shift)

Text To Column tool configuration.png

Formula tool configuration.png

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like