Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to input a list of different regular expressions into the RegEx tool ?

Hello!  I am working with a dataset that contains rows of XML data.  Each row of XML has similar data, but varying syntax.  I am trying to parse specific values out of the XML, but because the syntax varies, I am only able to parse values from one row at a time.  I would like to be able to have a list of the syntax that corresponds to the individual rows. Then feed that list into the RegEx tool to parse the data from each row without needing to write a separate RegEx for each row.  Is this possible?  See attached for an example of what I'm talking about. Thanks!  

 

Similarly, could the same be done using the XML Parse tool or another approach I haven't thought of?

3 REPLIES 3
geraldo
13 - Pulsar

@Brandon_Schiermeyer 

 

if you can send a sample of the data

patrick_digan
17 - Castor
17 - Castor

@Brandon_Schiermeyer Dynamic Replace and Appending the whole list to each row were the first 2 things that I thought of. I gave it really simple sample data, so hopefully it works for you!

patrick_digan_1-1686850066261.png

 

 

The dynamic replace allows for dynamic formulas to be written, but it's hard to understand and properly write the formulas. The append solution is much simpler, but appending the list to your data may make for a large dataset.

 

Hope that helps!

That was exactly what I needed!  Thank you!

Labels