Extract data using regular expressions
Generates new tags with the data extracted from one or more regular expressions.
200+ apps to connect·Tested & maintained tasks·Human support in English & Spanish
In detail
What it does and what it's for
Automating tasks with Botize's Text Parser allows you to extract specific data from texts using regular expressions. This integration enables the creation of tags containing lists of elements extracted according to defined patterns, streamlining processes such as extracting email addresses, numbers, or URLs from any textual content.
With this tool, you can set up automations that efficiently process texts, applying multiple regular expressions to obtain the relevant information you need. This is particularly useful for tasks like cleaning affiliate URLs in Telegram messages or extracting specific content from incoming emails.
Each new tag is a list of 1 or more items according to the regular expression used. To access the values of each tag, use the name followed by a period and the index of the element. For example {{new_tag.1}} to access the second value containing the tag.
This operation is equivalent to the command match in Javascript.
How it works
How it fits in an automated task
A Botize task pairs a trigger with one or more actions. This piece is one of them.
Pick a trigger
The event that starts the task, from this app or any other.
This action runs
Botize performs it automatically using the data the trigger delivers.
Turn it on and forget it
The task runs on its own from then on. If something's off, tweak it or we'll help you.
Setup
Customization options
Fields you can adjust when using it in your automation.
Regular Expression Examples
The following table contains a list of regular expression examples for different cases.
Extract first sentence
| Text | Text 1. Text 2. Text 3. |
| Pattern | /(.[^\.]*)\./ |
| Results | {{match.0}} → Text 1. {{match.1}} → Text 1 |
Extract the first sentence and the remaining text
| Text | Text 1. Text 2. Text 3. |
| Pattern | /(.[^\.]*)\.(.*)/ |
| Results | {{match.0}} → Text 1. Text 2. Text 3. {{match.1}} → Text 1 {{match.2}} → Text 2. Text 3. |
Extract the email
| Text | My email address is contact@gmail.com |
| Pattern | /([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi |
| Results | {{match.0}} → contact@gmail.com |
Extract the first number
| Text | The ABC 123 Song |
| Pattern | /^[^\d]*(\d+)/ |
| Results | {{match.0}} → The ABC 123 {{match.1}} → 123 |
Extract the first word ending in '-tion'
| Text | Automation is key for optimization |
| Pattern | /\b\w*tion\b/ |
| Results | {{match.0}} → automation |
Extract the first URL
| Text | Visit my website https://abc.com/section?param=1 |
| Pattern | /(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])/ |
| Results | {{match.0}} → https://abc.com/section?param=1 {{match.1}} → https {{match.2}} → abc.com {{match.3}} → /section?param=1 |
Extract the first URL from a specified domain
| Text | Visit my website https://abc.com/section?param=1 and https://xyz.com |
| Pattern | /https://ad\.admitad\.com/[^"\s]+/ |
| Results | {{match.0}} → https://xyz.com |
Output data
Information provided
When executed, this operation delivers the following data, which can be used in the same automatic task.
Tags
- _status {{_status}}
Learn by watching
Video tutorials
Short videos where you watch a real task being built from start to finish.
Get inspired
Ready-to-use automations
Real tasks built with Text Parser: switch them on in minutes and tweak them to your liking.
Need a hand?
Real people behind it
Email us
info@botize.com
Monday to Friday from 7 a.m. to 1 p.m. (Spain).
Message us on Telegram
t.me/botize
Monday to Friday from 7 a.m. to 1 p.m. (Spain).
Come with an idea.
Leave with an automation.
Create your first task in minutes. Do it once and forget about it forever.
Start automating