ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Can you place a formula inside the RegEx tool

alex
11 - Bolide

Can you place a formula inside the regex expresssion?  For example using the match option in the RegEx tool can I tell it to match the value in a specified field inside the workflow by specifiying the field?  .*Field1

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

You can't put a formula in the Regex tool, but you can use the REGEX functions within a formula:

 

- REGEX_CountMatches

- REGEX_Match

- REGEX_Replace

 

See help document here

alex
11 - Bolide

Thanks for the reply.  I was trying to have the RegEx tool be able to handle the result of a formula instead of having to have a fixed value in the match string.  I guess that's not possible from what I've seen so far. Man Happy

jdunkerley79
ACE Emeritus
ACE Emeritus

That is possible in a formula tool but not in the regex tool. 

 

Try something like:

 

Regex_match([Field2], ".*" + [Field1])

The regex tool takes a constant I believe so as far as I know no way there. 

alex
11 - Bolide

I didn't think about concatenating the field with the ".*" inside the RegEx_Match function.  Gives me another option besides Contains function.  Thanks!

Labels
Top Solution Authors