Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Built-in tools
  • Formatter
  • Text

Use regular expressions (regex) to find text in Zaps

Written by Owner

Updated at August 20th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Tables
    Work with tables Manage tables Create tables Troubleshoot Zapier Tables
  • Product updates
    Product updates: January 2023 Product updates: March 2023 Product updates: February 2023 Product updates: April 2023 Product updates: May 2023 Product updates: June 2023 Product updates: July 2023 Product updates: August 2023 Product updates: September 2023 Product updates: October 2023 Product updates: November 2023 Product updates: December 2023 Product updates: January 2024 Product updates: February 2024 Product updates: March 2024 Product updates: April 2024 Product updates: May 2024 Product updates: June 2024 Product updates: July 2024 Product updates: August 2024 Product updates: September 2024 Product updates: October 2024 Product updates: November 2024 Product updates: December 2024 Product updates: January 2025 Product updates: February 2025 Product updates: March 2025 Product updates: April 2025 Product updates: May 2025 Product updates: June 2025 Product updates: July 2025 Product updates: August 2025
  • Zaps
    Zap basics Zap history Troubleshoot Zaps Manage your Zaps Do more with Zaps
  • Your Zapier account
    Plans Billing Account profile Notifications Data privacy & security Get help User roles and permissions
  • Interfaces
    Troubleshoot Zapier Interfaces Create an interface Use interface components Manage interfaces
  • Canvas
    Create a canvas Collaborate on a canvas
  • Chatbots
    Add logic and knowledge to chatbots Troubleshoot chatbots Create chatbots Manage chatbots
  • Getting started
    Intro to Zapier Set up your Zapier account Use case templates
  • Agents
    Create agents Manage agents Troubleshoot agents
  • MCP
    Set up MCP
  • Built-in tools
    Filter & Paths Formatter Schedule & Delay Email, IMAP, SMTP, & Email Parser Webhooks & Code Storage, Digest, & RSS Sub-Zap & Looping Other built-in tools Custom Actions & API Requests Functions AI by Zapier & AI actions Copilot Human in the Loop
  • Lead Router
    Create routers
  • Apps
    Connect and manage your app connections AI apps on Zapier Apps on Zapier
+ More

Table of Contents

1. Add a Formatter step to your Zap 2. Set up your transform 3. Optional: Set up regex options 4. Optional: Create a group label (Match All only) 5. Test your step

Available on plans:

A green checkmark

Free

A green checkmark

Pro

A green checkmark

Team

A green checkmark

Enterprise

Formatter's Extract Pattern transform allows you to find and use text that's part of a field by using a pattern (a Python regex) to search for it. This can be useful, for example, if you need data such as a name, but it's within a field that also contains the person's phone number and you need it separately. 

miscEye icon Note

Regex is an advanced feature, and Zapier Support cannot offer help with it. If you encounter a problem, reach out to the Zapier Community or StackOverflow. You can also try one of the ready-made extract transforms for phone number, URL, number, and email address.

 

1. Add a Formatter step to your Zap

  • In the Zap outline, click the Action step or the plus sign + to add a new action. A dialog box will open.
  • In the search box, search for and select Formatter. The right sidebar will open to the Setup tab.
  • Click the Action event dropdown menu and select Text.
  • Click Continue.

 

2. Set up your transform

  • Click the Transform dropdown menu and select Extract pattern.
  • In the Input field, select a field from a previous step you want to extract content from.
  • In the Pattern field, enter the Python regex you want to use.
  • Click Continue.
miscEye icon Note

The Input field also works with line items. It will look for the pattern in each item individually. However, if you select Yes in the Match All field, this Formatter step will not work with line items.

 

3. Optional: Set up regex options

You can use the following regex options to refine the search:

  • Match All - Matches all occurrences of pattern within the field. Returns the results as line items. If this option is set to Yes, the Input field won't work with line items.
  • MULTILINE - If your field contains multiple lines, this option allows ^ and $ to match the start and end of each line.
  • DOTALL - Allow dot (.) to match a newline pattern. Normally, a dot (.) will match anything except for newlines.
  • IGNORECASE - Ignore upper/lowercase differences when searching.

 

4. Optional: Create a group label (Match All only)

If you select Yes in the Match All option, you can create a label for the line item group, to help you identify them for use in your Zap later. You can do so with the following pattern:

(?P<label_name>your_pattern)

 

actionEdit icon Example

In this example, we want to create a group label called first_name, by using the pattern (?P<first_name>^\w+\s) that will search for matches on the following content (as one field):

Jonny Mills - 45 Road Name

Marie Miller - 55 Road Name

The output then becomes the following (as separate fields):

  • Jonny
  • Marie

 

5. Test your step

  • Click Test step. If anything is found, you'll see the results of the search. 

If the regular expression finds a match, it will return it in the field Output. The content of this field can vary depending on the options you select. Each match will always return at least these fields:

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

miscEye icon Note
If your pattern has multiple matches, the first match will appear as 0, the second match as 1, and so on.

 

Once you've finished setting this step up, you can add another action to use the results of the Formatter step.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Modify large data for your AI prompts
  • Use Formatter to split text in Zaps
  • Convert the letter casing in a text string in your Zaps
  • Remove extra text from your Zap data
  • Use Formatter to decode and encode HTML in Zaps

Copyright 2025 – OBZ-Zapier.

Knowledge Base Software powered by Helpjuice

Expand