I would like to adapt the Regex Parse tool to make it dynamic. The intention is to pass in the regex pattern from the datastream, either as a column in the data or as a control value somehow. I have tried experimenting with wrapping the tool in a macro, and then using the Action Tool to try to update the XML, but I cannot get it to work. Most of the documentation on the Action Tool focuses on interactive user input. How can I reconfigure the Regex pattern from the datastream?
The inbound data would be a text column, and a Regex pattern column. I would be OK if the pattern was the same for each text string, but I just need to be able to build the pattern from data, rather than have it hard-wired.
Solved! Go to Solution.
You can use a field with a regex pattern in the formula tool. And that pattern can be as dynamic as you like based on incoming data... I think
Hi @Hiblet if I'm understanding this right I think using the Formula tool & REGEX_Replace could suffice using the 'pattern' field as a dynamic input?
Sorry, should have been more specific, I am trying to tokenize the data to extract the matches.
Apologies, I am trying to extract the strings that match, to rows, so my wrapped tool would be a Regex Parse set to Tokenize with output as Rows.
Christina's got the solution I needed. I was trying to get the control parameter from the actual inbound data stream, which is where I was confused. Thanks for the help!