0

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)

MattWD
  • 1
  • 1

1 Answers1

0

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

ariagao
  • 1
  • 1