Help

Find text with regex in Zaps

Last updated:

Sometimes you’ll need to search through text in the data from one of your steps so you can use those values in subsequent steps. Formatter steps have a simple “Find” transform that can be used to find text. For a more advanced way to search through text, Formatter provides the “Extract pattern” transform, as well, which uses regular expressions (regex) to parse your data. Follow these steps to learn how to set that up


1. Add a Formatter step to your Zap

  • Add a new action step to your Zap
  • Select Formatter as the app
  • Select Text for the action event
  • Select Continue

2. Set up the “Extract pattern” transform

Select Extract pattern for the transform
Select the data you want to search through in the input field
Enter the Python regex you want to use in the Pattern field
Select Continue

In order to have this step return text in its output, you must include a capture group in your regex. If you do not include a capture group, the output will provide these three fields instead of the text:

_end - last position of match in text
_start - first position of match in the text
_matched - true or false based on the match

In this example, we want to extract the word “three” so we put it in parentheses.


3. Test your step

  • Select Send test to Formatter by Zapier
  • If your test was successful, you’ll see a success message

Note, the test is just a test of if the step is working properly, whether or not the regex returned a result.

Once you've set up the Formatter step, you'll continue setting up the rest of your Zap by adding another action. Be sure to use the output from the Formatter step in your next action step.


Need More Help?

Contact Support

Tell us about your problem, and we’ll find you a solution or you can email support.
Get Help

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert

Zapier Community

Connect with other Zapier users and industry professionals to get help crafting the perfect workflow.
Check out the community