How to Use Regular Expressions in Make.com
Regular expressions are a powerful way to search, filter, and transform text in make.com scenarios. This guide explains what regular expressions are, how they work in make.com modules, and how to build and test patterns safely.
What Are Regular Expressions in Make.com?
Regular expressions, often called regex or regexp, are patterns for matching text. In make.com, they let you describe complex search rules instead of using basic string functions.
You can use a regular expression to:
- Check whether a field matches a specific format.
- Extract parts of text, such as IDs, emails, or codes.
- Replace or clean data according to precise rules.
In make.com, regular expressions follow the standard syntax documented on the official regular expression reference page, which you can see at the make.com regexp documentation.
Core Syntax Used by Make.com Regular Expressions
Make.com relies on common regular expression syntax that you can combine to build powerful patterns.
Basic Characters and Literals in Make.com
Most characters match themselves. For example, the pattern cat matches the substring “cat” anywhere in the text.
- Literal characters: Letters, digits, and most symbols match exactly as written.
- Escaped characters: Precede a special character with a backslash (
) to match it literally, such as.to match a dot.
Character Classes in Make.com
Character classes match any one character from a defined set.
[abc]matchesa,b, orc.[^abc]matches any character excepta,b, orc.[0-9]matches a digit from 0 to 9.[A-Za-z]matches any letter, uppercase or lowercase.
Make.com uses these classes in validations such as checking numeric IDs or alphabetic codes.
Predefined Character Classes in Make.com
To avoid writing long brackets, make.com supports shorthand classes.
dmatches any digit (0–9).Dmatches any non-digit.wmatches word characters (letters, digits, underscore).Wmatches non-word characters.smatches whitespace (spaces, tabs, line breaks).Smatches non-whitespace.
Quantifiers and Positions in Make.com Regex
Quantifiers and anchors control how many characters to match and where they occur in the text you process in make.com.
Quantifiers in Make.com Patterns
*– zero or more occurrences (e.g.d*matches any number of digits, including none).+– one or more occurrences (e.g.d+matches at least one digit).?– zero or one occurrence, making the item optional.{n}– exactlynoccurrences (e.g.d{4}for exactly four digits).{n,}– at leastnoccurrences.{n,m}– betweennandmoccurrences.
Quantifiers are greedy by default, meaning they match as much as possible. You can often refine patterns by anchoring or scoping them to avoid over-matching in make.com automations.
Anchors (Positions) in Make.com
Anchors match positions, not characters.
^matches the start of the string.$matches the end of the string.bmatches a word boundary.Bmatches a non-word boundary.
For example, ^d+$ ensures that an entire text field processed in make.com consists only of digits.
Groups, Alternation, and Escapes in Make.com
Grouping and alternation allow you to build more advanced patterns in make.com while keeping them readable and reusable.
Capturing Groups in Make.com
Parentheses create groups that you can later reference.
(abc)groups the sequenceabc.(d{3})-(d{2})captures two numeric parts separated by a dash.
In many make.com modules, captured groups can be used for replacements or for extracting structured data from a single input field.
Alternation with the Pipe Operator
The pipe symbol | expresses alternatives.
cat|dogmatchescatordog.(red|green|blue)matches one of the listed colors.
Alternation is especially useful in make.com when you need to validate several acceptable values in a single field.
Escaping Special Characters in Make.com
Certain characters have special meanings and must be escaped to match them literally.
.for a literal dot.*for an asterisk.?for a question mark.+for a plus sign.
Always escape these characters when you want them as plain text in a make.com pattern.
Step-by-Step: Using Regex in Make.com Scenarios
Follow these steps to add a regular expression to an automation built in make.com.
1. Identify the Text to Process
Decide which module output or field you want to analyze. Common sources in make.com include:
- Webhook payloads.
- Form submissions.
- Email subjects or bodies.
- Data from APIs.
2. Define the Expected Format
Describe what valid data looks like. For example:
- An order ID like
ORD-12345. - An email address.
- A date in
YYYY-MM-DDformat.
This description becomes the blueprint for your make.com regular expression.
3. Build the Regular Expression
Translate the description into a pattern. Examples:
- Order ID:
^ORD-d+$ - Date:
^d{4}-d{2}-d{2}$
Use groups and character classes where needed, following the syntax guidelines documented in the official make.com regex reference.
4. Test the Pattern Safely
Before using the pattern in production, always test it. You can:
- Use a dedicated testing tool that supports the same syntax as make.com.
- Try sample data from your scenario and confirm only the desired text matches.
- Check edge cases such as empty strings, partial matches, or invalid formats.
5. Apply the Pattern in Make.com Modules
Once tested, apply the pattern inside relevant modules. Depending on the module, you may:
- Use the pattern to validate a field.
- Extract captured groups.
- Clean or transform data using a replacement rule.
Make sure you handle cases where no match is found so that your make.com scenario continues to run reliably.
Best Practices for Regex in Make.com
To keep your regular expressions maintainable in make.com projects, follow these recommendations.
- Keep patterns as simple as possible. Avoid overly complex constructions if a simpler one works.
- Document what each pattern does. Add comments or notes near the module configuration.
- Reuse patterns. When several make.com scenarios rely on the same rule, store the pattern in a shared reference for consistency.
- Anchor when needed. Use
^and$when the entire field must match the pattern. - Test regularly. Whenever you change formats or data sources, retest the related expressions.
Where to Learn More About Make.com Regex
For a complete technical description of the syntax available in make.com, including all operators and nuances, refer to the official regular expressions help page. It lists all supported features, explains individual tokens, and gives examples compatible with make.com.
If you need help designing robust automations, optimization consultants such as Consultevo can assist with scenario architecture, data design, and regex validation strategies tailored to make.com workflows.
By understanding these core concepts and following a structured approach, you can use regular expressions in make.com to validate, extract, and transform text with precision, making your automations more reliable and easier to maintain.
Need Help With Make.com?
If you want expert help building, automating, or scaling your Make scenarios, work with ConsultEvo — certified workflow and automation specialists.
