- Getting started with Airtable
- Introduction to Airtable basics
- Contacting Airtable Support Updated
- Airtable home screen
- Glossary of Airtable terminology
- Airtable technical requirements
- Feature differences between Airtable on desktop and mobile
- Airtable keyboard shortcuts
- Using Markdown in Airtable
- Adding descriptions in Airtable
- Finding Airtable IDs
- Airtable Automations
- Automations Overview
- Automation feature walkthroughs
- Integrated automation walkthroughs
- Airtable automation walkthroughs
- Linking existing records using automations
- Conditional groups of automation actions
- Repeating groups of Airtable automation actions
- Creating recurring records using automations
- How to delay Airtable automation runs
- Prevent automations from triggering by mistake
- Use automations to timestamp status updates
- Automation Triggers
- Airtable Triggers
- Airtable automation trigger: When record matches conditions
- Airtable automation trigger: When a form is submitted
- Airtable automation trigger: When record created
- Airtable automation trigger: When record updated
- Airtable automation trigger: When record enters view
- Airtable automation trigger: At scheduled time
- Airtable automation trigger: When webhook received
- Airtable automation trigger: When a button is clicked
- Airtable automation trigger: When email received Updated
- Integrated Triggers
- Airtable Triggers
- Automation Actions
- Airtable Actions
- Airtable automation action: Send email Updated
- Airtable automation action: Create record
- Airtable automation action: Update record
- Airtable automation action: Find records
- Airtable automation action: Sort list
- Airtable automation action: Run a script Updated
- Airtable automation action: Generate with AI
- Integrated Actions
- Airtable automation actions: Slack
- Airtable automation actions: Google Workspace
- Airtable automation action: Send MS Teams message
- Airtable automation actions: Outlook
- Airtable automation actions: Jira Cloud
- Airtable automation actions: Jira Server / Data Center
- Airtable automation actions: Salesforce
- Airtable automation action: Create post in Facebook Pages
- Airtable automation actions: GitHub Issues
- Airtable automation action: Hootsuite post
- Airtable automation action: Send Twilio SMS
- Airtable Actions
- Airtable Bases
- Using Airtable Cobuilder
- Airtable bases overview
- Creating and managing Airtable bases
- Structuring bases in Airtable
- Moving bases between workspaces in Airtable
- Creating and managing tables in Airtable
- Creating Airtable base share links
- Importing third-party data into Airtable
- Using insights in Airtable
- Troubleshooting Airtable base performance
- Airtable Betas
- Collaborating in Airtable
- Airtable Enterprise Support
- General Enterprise information
- External badging in Airtable
- Using app library and components in Airtable Updated
- Ask an Expert beta overview
- European data residency at Airtable
- Airtable user groups overview
- Airtable Enterprise API
- Creating and managing data retention policies in Airtable
- eDiscovery APIs in Airtable
- Airtable and data loss prevention
- Accessing Enterprise audit logs in Airtable
- Set up Jira Server / Data Center to connect with Airtable
- Admin panel pages
- Airtable admin panel overview
- Users - Airtable enterprise admin panel
- Airtable admin panel user details
- Groups - Airtable admin panel
- Workspaces - Airtable Enterprise Admin Panel
- Bases - Airtable admin panel
- Interfaces - Airtable admin panel
- Data sets - Airtable admin panel
- Managed apps - Airtable admin panel
- Components - Airtable admin panel
- Reports - Airtable admin panel
- Settings - Airtable admin panel Updated
- Managing Enterprise organizations
- Managing Enterprise admins in admin panel
- Using Organizations
- Organization branding for apps in Airtable
- Enterprise Hub in Airtable
- Enterprise Hub: Org unit assignment with user groups Updated
- Deactivating, removing access, and reactivating users in the admin panel
- Managing user access to workspaces and bases
- Airtable Enterprise Key Management Updated
- Custom terms of use New
- Enterprise SSO
- General Enterprise information
- Airtable Extensions
- Airtable Fields
- Fields Overview
- Attachment
- Date-based fields
- Formula
- Getting Started with Formulas
- Formula Foundations
- The essentials of Airtable formulas
- Formula writing tips for beginners
- Troubleshooting formulas
- Basic calculations
- Conditional statements
- Logical arguments
- Working with dates
- Displaying DATETIME_FORMAT using the date field in Airtable
- Working with date functions in Airtable
- Calculating the difference between dates in Airtable
- Supported DATETIME_DIFF unit specifiers in Airtable
- Supported DATETIME_FORMAT format specifiers in Airtable
- Using the DATETIME_PARSE() formula in Airtable
- Working with timezones
- Record functions
- Text functions
- Numeric functions
- Common Solutions: Beginner
- Common Solutions: Intermediate
- Common Solutions: Advanced
- Long Text Field
- Linked Record Field
- Linking records in Airtable
- Limiting linked record selection to a view in Airtable
- Dynamic filtering in linked record fields
- Linking to one, many, or a subset of Airtable records
- Converting existing fields to Airtable linked records
- Reordering record links in Airtable
- Understanding linked record relationships in Airtable
- Number-Based Fields
- Other Fields
- Rollup, lookup, and count fields
- Select and user fields
- Integrating with Airtable
- API
- Getting started with Airtable's Web API
- Creating personal access tokens
- Airtable Webhooks API Overview
- Service accounts overview
- Airtable Web API - Using filterByFormula or sort parameters
- Airtable API Deprecation Guidelines
- Airtable API: Common troubleshooting
- Managing API call limits in Airtable
- URL length limitations for web API requests
- Integration services
- Third-party integrations via OAuth overview
- Troubleshooting disconnected OAuth integrations in Airtable
- Options for integrating with Airtable
- Third-party integrations - Common troubleshooting
- Low-code integrations - Common troubleshooting
- Integrating Airtable with external calendar applications
- Visualizing records from Airtable in Tableau
- Visualizing Airtable records in Microsoft Power BI & Power Query
- Integrating HubSpot with Airtable
- Using Zapier to integrate Airtable with other services
- Using Zapier's Multi-Step Zaps to find and update records
- Using IFTTT to integrate Airtable with other services
- Integrating with AWS Lambda & DynamoDB
- Developer tools
- API
- Airtable Interface Designer
- Interface Designer overview articles
- Interface layouts
- Interface elements
- Adding and removing elements in interfaces
- Adding layouts to interfaces
- Formatting elements in interfaces
- Interface element: Button
- Interface element: Calendar
- Interface element: Chart
- Interface element: Filter
- Interface element: Gallery
- Interface element: Grid
- Interface element: Kanban
- Interface element: Number
- Interface element: Record picker
- Interface element: Text
- Interface element: Timeline
- Learning and Resources
- Managing Airtable
- Airtable Policy
- Airtable Records
- Airtable Sync
- Airtable Views
- Airtable Workspaces
- Print
- Share
- DarkLight
- PDF
Using REGEX() functions in Airtable
- Updated on 31 Jan 2024
- 3 Minutes to read
- Print
- Share
- DarkLight
- PDF
This article covers how to use REGEX() to streamline your team's and organization's work.
All plan types | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading |
REGEX() in Airtable overview
REGEX() overview
NOTE
Note that our REGEX functions only work with text strings. If you are using either a rollup or lookup field, you may need to first convert the data into a string before you can use a REGEX function on it (you could use ARRAYJOIN() for this). Also note that rollup, lookup, and formula fields do not currently support rich text.
In our formula field reference, you'll find the basic overview for the REGEX() functions that Airtable currently supports. Currently, Airtable supports three functions: REGEX_MATCH()
, REGEX_EXTRACT()
, and REGEX_REPLACE()
. Each of these functions has advantages and disadvantages depending on the formula output you are expecting to be produced in your formula field.
NOTE
In this article we will not be covering all of the Regular Expression patterns in-depth. There are many outside resources that provide great deep dives into REGEX and pattern matching (like regex101, or the MDN Regex cheatsheet) that we recommend checking out for more detail.
You may be wondering what a regular expression is; you can think of a regular expression as an arrangement of symbols and characters conveying a string or pattern to be searched for within a larger body of text. The result is something similar to a search engine.
In Airtable, we offer the find bar as well as the Search extension to find certain literal instances of certain strings or patterns. Additionally, we offer the FIND()
and SEARCH()
functions as well as other relevant text extraction functions in the Text operators and functions section of the formula field reference.
However, the REGEX functions that follow provide a way to search the information in your tables as well as the ability to work with that information in powerful ways.
REGEX_MATCH in Airtable
REGEX_MATCH
The REGEX_MATCH()
function returns whether the input text matches a regular expression and outputs in the Boolean data type as a 1 (true) or 0 (false) result. Two examples of where this may be useful are in phone number validation and email validation within your base.
REGEX_MATCH phone number validation
If you need to validate a set of phone numbers against specific criteria, you can use REGEX_MATCH() like in the formula below.
REGEX_MATCH( {Possible Phone Number}, '^(\\+\\d{1,2}\\s?)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$')
This regular expression handles a number of different phone number formats:
Country codes
Using dashes or spaces as delimiters
Parentheses around the area code
Using letters instead of numbers
REGEX_MATCH email validation
Similar to the other example above, you can use REGEX_MATCH() to validate a list of email addresses as well.
REGEX_MATCH( {Email address}, "(\W|^)[\w.\\-]{0,25}@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(\W|$)")
This regex handles basic validation for email addresses: Starts with a username that is composed of letters, numbers, or characters like underscore, period or dash. An at-sign (@). A domain name, which is a string of letters, numbers, or characters like underscore, period, or dash, followed by a period, followed by another string of letters, numbers, or characters like underscore, period or dash. Email validation is a very complicated subject, but this regex is a good starting point for most use cases.
REGEX_EXTRACT in Airtable
REGEX_EXTRACT
The REGEX_EXTRACT()
function returns the first substring that matches a regular expression. If the REGEX_EXTRACT()
function finds no matching instance of the provided regular expression it will return an ERROR
.
In the example below, this function is used to extract the domain name from a URL field.
REGEX_EXTRACT - extracting domains from URLs
REGEX_EXTRACT( {URL}, '^(?:https?:\\/\\/)?(?:[^@\n]\+@)?(?:www\\.)?([^:\\/\n?]+)')
URLs start with HTTP or HTTPS, possibly a username followed by an @ symbol, the domain, and then the rest of the URL. Here, we strip off the subdomain if it’s ‘www’, but otherwise preserve it.
REGEX_REPLACE in Airtable
REGEX_REPLACE
The REGEX_REPLACE()
function substitutes all matching substrings with a replacement string value. Building off of the example above, if we have a valid phone number, we can normalize it using REGEX_REPLACE()
to make it easier to work with in the rest of our Airtable base.
REGEX_REPLACE - normalizing phone numbers
IF({Is Valid Phone Number?}, UPPER(REGEX_REPLACE({Possible Phone Number}, '[^A-Za-z0-9]', '')), ERROR('Invalid phone number'))
If the phone number passed validation, we normalize it by using REGEX_REPLACE() to replace non-alphanumeric characters with an empty string, resulting in just the dialable digits. We also use the UPPER() formula to make the casing consistent. Normalizing phone numbers into a prettier format is an exercise left to the reader.
T() and REPT() in Airtable
T() and REPT()
This content is part of a guided course, which includes the functions listed below that can help expand functionality in your Airtable base.
T() in Airtable
T()
This function returns the argument if it is text, and otherwise returns blank.
T("Text only")
would return the argument, "Text only", while T(42)
would return as blank.
REPT() in Airtable
REPT()
This function repeats any referenced string a specified number of times.
For example, REPT("Hi! ", 3)
would result in Hi! Hi! Hi!
.