How To RegEx in Alteryx

How can you access the dynamic world of regular expressions from within Alteryx? Glad you ask. Check out this 3-minute-introduction and you will be one step closer to using RegEx like a pro to single out exactly what you need from even the messiest of strings in a predictable manner.

There are two places in Alteryx where you generally use RegEx. You either define your patterns from within a formula or use the dedicated RegEx tool. This article's main focus will be the the RegEx tool.

The RegEx Tool

The above image shows Alter Alteryx's RegEx tool. As you can see, it is structured into three main areas. In the top section you are able to select the field Regex is applied to. In the middle part you specify your search pattern and toggle case sensitivity. At the bottom you choose how to use whatever matches the pattern you have specified. Here is the same screenshot once again explaining what each of these functions actually does:

This pretty much sums up the tool. As always with Alteryx's tools, it is recommended to check out the example workflows to see how the various functions can be used with some dummy data.

Using RegEx in a Formula

Alternatively you can use RegEx from within the formula tool. The three functions using RegEx at this time are

* REGEX_Replace()
* REGEX_Match()
* REGEX_Count_Matches()

and are pretty self-explanatory. As a general rule, ask yourself the question what you want to do with your matches early on, and the proper function should become evident. If not, the solution is probably just one or two tools away after matching or counting matches with RegEx.

Some Useful Resources

If you're new to RegEx, head over to RegExOne, an ideal place for starters. To play around with syntax interactively, or test patterns, regexr or regex101 are your go-to places. And if you've never ever seen RegEx syntax before, here is a little preview (taken from regexr, by the way):

Author:
Matthias Albert
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab