Over the last month or so, I’ve been covering the Shortcuts and Automator apps on iOS and macOS, respectively. Both are powerhouses when it comes to automation in the Apple ecosystem, and beginning with macOS Monterey this Fall, Shortcuts will be the go-to automation app on all Apple devices. This is why I wanted to spend this article discussing a very powerful topic: Using regex with the Shortcuts app.
While I have some background in computer science and programming, I had somehow never come across regex. Maybe the name scared me off, or maybe it was the code, which is some of the least readable code I’ve ever seen.
Whatever the case, I decided to look further into regex after covering the Shortcuts app over the last few months. And what I discovered was that a lot of the limitations I had been running into with Shortcuts, as well as Automator, could be overcome with regex.
In other words, it wasn’t that these apps were lacking features, but that I was lacking education.
So in today’s post, you and I are going to learn the ins and outs of regex together. That way, you can get the most out of each of these apps.
We’re going to cover the basics of regex (starting with what it is), what you can do with it in the Shortcuts app, some websites and resources you can use if you don’t feel like learning regex yourself, and then we’ll go into the core concepts and mechanics of the regex language.
Alright, let’s get started!
Contents
- What are regular expressions (i.e., regex)?
- How can you use regex with the Shortcuts app?
- Use regex101.com to test your regular expressions
- If you don’t want to learn how to use regex with the Shortcuts app, read this
- Regex for beginners: Start using regex with Shortcuts
- What are regex flavors?
- Websites and references to help you start learning regex with Shortcuts
- How to perform a basic text search using regex with Shortcuts
- Adding variable components to your regex searches
- Ranges can broaden your search
- How to exclude words and characters from your regex searches with Shortcuts
- Wildcards can give you more search options
- Use quantifiers to specify the length of text you’re looking for
- There are a few more quantifiers you’ll want to know about
- Search for characters at the beginning and end of a string of text
- Store text strings using the grouping function of regex with Shortcuts
- Now what?
- Start using regex with Shortcuts to take your automation to the next level
What are regular expressions (i.e., regex)?
A regular expression, or “regex”, is a bit of code that you can use to search for a piece of text inside of a larger piece of text.
In case you don’t know, a piece of text within another piece of text is called a “string” in programming. For instance, the word ‘green’ is a string of characters from the text “I wore green pants today.”
So put another way, regex is a way to locate a string of text in a larger body of text. And because regex is written in code, you can use it to perform some pretty complex operations.
For example, if you want to search for the word “email”, you can easily write a regex code that searches for email.
If you want to find an email that’s inside of a paragraph, though, and don’t know exactly what that email is, then you’ll need to search for a string of text that’s formatted like an email. i.e., a string that follows the “email@website.com” format.
Now, let’s say you not only want to find one email from a paragraph but every email. Maybe you want to quickly copy them somewhere else, update them to a new format, or replace them so that they all say “AprilFools@GotYou.com“.
As you get increasingly proficient and experienced with regex, you’ll be able to do all of these things and more.
Things you can do with regex
Alright, so maybe the examples with email I just gave aren’t that practical. Don’t worry – that’s far from the limit of what you can accomplish using regex with the Shortcuts app.
Generally speaking, everything that regex can do falls into one of these four categories:
- Find a string of text in a larger piece of text (i.e., searching for a word/string/type of string on a page of text).
- Confirm that a string of text matches your desired format (i.e., checking that a string of text is capitalized/ordered/punctuated properly).
- Replace or insert text in a specific area of a piece of text.
- Split up a string of text at specified points (e.g., divide a piece of text every time there is a comma).
The level of depth that you can use to interact with each of these kinds of functions and how you can combine them make regex an incredibly powerful tool for parsing through and manipulating text.
How can you use regex with the Shortcuts app?
Alright, so now you hopefully have a basic idea of what regex is used for. It’s a type of code that you can use to search for text, even if you don’t know exactly what that text is.
So how does this help you in Shortcuts? Similar to adding scripting to your Shortcuts, it’s a way to go from basic automations (Text me when the front door opens) to more advanced options (Automatically create a calendar event for my meetings every time I get an email for a Zoom meeting from work).
You can use regex with Shortcuts to check that an input is correct. For example, if you create a shortcut that only works with URLs, you can use regex at the start of the Shortcut to make sure that the user is running the automation on a URL.
You can combine regex with scripting to create powerful Shortcuts. For example, this Shortcut uses regex and scripting to turn a barcode into a URL for your favorite store.
When using the Shortcuts app on Mac (coming Fall of 2021), you can use regex to perform batch actions on a piece of text. For instance, you could copy all of the emails in a selection of text as an ordered list. Or, you could replace all of the names in a document with “*” characters to ensure privacy.
You could even copy a body of text from one app, reformat it to match the preferences of another app, and then paste it into that other app, all with a single right-click action.
In other words, regex gives you total control over text handling with the Shortcuts app. That may not sound very helpful at first, but now that you know it exists, you’ll surely start to notice how many Shortcuts could be improved by this feature. And you’ll also notice that a lot of Shortcuts aren’t even possible without regex.
Use regex101.com to test your regular expressions
Once you start using regex with Shortcuts, you’ll run into a point of frustration:
It’s really difficult to test your regex code. And that’s not unique to regex. Testing anything with the Shortcuts app is kind of a pain. The only way to do so is to run the Shortcut. That method isn’t bad when you’re just testing built-in Shortcuts features.
But for testing code, this doesn’t allow for line-by-line checking and it doesn’t offer a lot of feedback.
For that, I’d recommend using regex101.com. It’s a site that you can type regex code into in real-time. You can also type text into a text editor on the same webpage. As you type each, you’ll see if your regex is working, why it is or isn’t working, and get information on the matches found.
regex101.com is using a different flavor of regex than the one supported by Shortcuts (more on that in a minute), but it’s close enough that you shouldn’t run into too many issues.
Using this tool is great because you can write your regex there first, then copy it into the Shortcuts app once it’s working as intended.
If you don’t want to learn how to use regex with the Shortcuts app, read this
I get it – not everyone is going to want to learn how to use regex with Shortcuts. It is a skill, and that means it’s going to require time and practice. It’s nowhere near as simple as the rest of the drag-and-drop features of the Shortcuts app.
No worries! While you won’t be able to get as much out of the Shortcuts app as someone who does put in the time to learn regex, there are still options available for you. Namely, there are sites and pages online where people have created a list of regex code bites that you can copy and paste into the Shortcuts app.
Here are some links for you to check out if you don’t want to learn regex:
- https://www.shortcutfoo.com/app/dojos/regex/cheatsheet
- https://www.reddit.com/r/shortcuts/comments/9zo24n/regex_cookbook_for_shortcuts_reusable_regex_to/
- https://www.reddit.com/r/shortcuts/comments/b5labq/match_text_examples_for_the_beginner_a_regex/
- http://www.rexegg.com/regex-cookbook.html
Just read through those links and you should be able to find common regex solutions to Shortcuts you want to make. This won’t be an education-free option, as it’ll still take a bit to get the hang of what you’re looking at. But it’s a lot simpler and an ideal solution for someone who doesn’t have the time to put into regex.
That said, I have to admit that regex isn’t too difficult to learn, especially if you have some experience with shell code or beginner’s programming. Regex sounded like gibberish to me at first, but after an hour of reading through articles and playing with regex101.com, I was able to start writing regex for my Shortcuts.
It’s just a familiarity thing – after you look at it long enough, it’ll stop looking so odd. So if you do have the time and are just intimidated, don’t be!
Regex for beginners: Start using regex with Shortcuts
Alright, enough preface! You should have an idea of what regex is, what it can do, why you should learn it, and enough information to decide if you want to learn it. Now we’re going to get into the nitty-gritty.
There is a lot of content below, but don’t worry! This article is going to be more of a study guide. I recommend skimming over each section so that you get an idea of the mechanics that regex uses. This should also help you wrap your head around it, too, if you’re still confused about what regex is.
Once you’ve skimmed things, I recommend opening regex101.com and playing with each of the tools in each section below. That’ll help you see what the concepts look like in practice as well as improve your memory. After you’ve done that, you can just treat this article as a reference point – something you can come back to when you forget the bits and bobs of regex.
Ok, let’s go!
What are regex flavors?
First, we’re going to look at regex flavors. Don’t worry – this won’t affect your day-to-day usage of regex with Shortcuts. It’s just something to be aware of before you get started.
There are different versions of regex which are known as “flavors”. These different versions are still very similar. If you can learn to read and write one flavor, you should be able to read any of them. There will just be slight differences in how your regex code should be formatted.
In programming, these formatting specifics are known as “syntax”. It’s just the way that you have to write your code for that code to be understood by the app you’re writing it in.
Here’s why syntax matters
“Hey friend, how is your day going?”
“, is going friend?your Hey day how”
Both sentences have the same words, characters, and spaces. Only one makes sense, though, and that’s because it’s following conventional syntax.
In coding, one programming language might understand the first version but not the second. To another programming language, though, the second might make total sense while the first one looks like gibberish. To someone who can speak English, though, you can probably understand the intention of both lines, even though one will take a bit of work to get the meaning of.
That’s (sort of) what the different flavors of regex are like. They’ll all look a little different and a little similar to you. But you must be using the right flavor for the app you’re using, or else that app will have no clue what you’ve written.
The Shortcuts app understands the ICU flavor of regex, so that’s the flavor you’ll want to use. The regex101.com site has a few different flavors that you can choose from on the left of the page. It does use PCRE, though, which is pretty similar to ICU.
It’s important to know that there are different flavors of regex because you’ll no doubt run into different flavors online. If you find a bit of regex you want to steal but can’t get it to work with Shortcuts, or it just doesn’t look right, check what flavor it’s written in!
Websites and references to help you start learning regex with Shortcuts
Another thing I want to cover before we start exploring the actual mechanics of writing regex is resources. I am by no means claiming that this post is an exhaustive resource on learning regex. It’s just meant to be a helpful starting point for those who want to use regex with Shortcuts.
If you want to dive deeper into regex or feel that this article isn’t giving you the help you need, you can check out some of these articles, guides, and tools:
- https://regex101.com – A website that lets you test your regex code in real-time.
- https://www.shortcutfoo.com/app/dojos/regex/cheatsheet – A cheat sheet for when you forget what each character does
- http://www.rexegg.com – This website is a comprehensive resource on learning everything you need to know about regex. Check this one out if you want to become proficient with regex.
- https://scottwillsey.com/blog/ios/regex1/ – This is a four-part blog series on using regex with Shortcuts. I am taking a very different approach from this guide, so it should make a nice companion series to this article.
- Stack Overflow and Reddit are both good websites to share your regex questions and progress to get advice and answers.
These resources are distinct from the ones listed in the If you don’t want to learn how to use regex with the Shortcuts app section as they will all require you to actually start learning regex. They’re more comprehensive, while the others are just reference points.
How to perform a basic text search using regex with Shortcuts
Alright! We have now made it to the point that everyone has been waiting for: We’re going to learn the fundamentals of using regex with Shortcuts.
Let’s start with a basic search, as this is the simplest thing you can do with regex. As mentioned before, I recommend having regex101.com opened in another tab so you can follow along.
At its most basic, regex will search for (or match) whatever you type into it. For example, if I were to type Alright
as my regex code, it would find every instance of the word “Alright” in this guide.
Case, spacing, and punctuation matter. That means that Alright
, alright
, Alright!
, and Alright ,
are all going to produce different results.
And that’s it! Whenever you type something into a regex search without using any special characters, regex will match anything that exactly matches whatever you typed.
There is one catch! Some characters on your keyboard are also special regex characters. That means that they perform some kind of function in regex code.
The ?
symbol is one such character. It’s used in regex code as a quantifier. So if you try to search for “Alright?” by typing Alright?
as your regex code, you’re not going to get what you want.
To fix this, you have to specify that you want to use “?” as a string, not as a special character. To do that for this character or any other, just add a \
symbol right before the character whose special properties you want to nullify.
So if you want to search for “Alright?” with regex, your code will look like this:
Alright\?
If you’re not sure if a specific character is treated as a special character by regex, you can check this cheat sheet for all of the special characters in regex.
Search for more than one word using the “or” character
Another important component of searching for strings with regex is using the “or” function. This is a character that you can place between two words/characters to say, “Match this or this.”
For instance, if I want to search a body of text for the word “alright” and “Alright”, I would use the |
character. Like so:
Alright|alright
If you’re having a hard time finding the |
character, hold the shift key down and press the \
key. It’s above the return key on most keyboards.
Adding variable components to your regex searches
Ok, so now that you know what neutral regex is like, it’s time to pick up your first special character. That would be the square brackets, which are these things []
.
Whatever you put inside these brackets is going to be considered a variable component of your regex search. You can put as many characters in the brackets as you like, though only one will be valid per match.
Alright, that does sound a bit complicated, but it’s not! Here’s what it looks like in practice:
[A]lright
will just match the word “Alright”. Kind of pointless.[AB]lright
will match both “Alright” and “Blright”.Alr[iouxyz]ght
will match “Alright”, “Alroght”, “Alrught”, “Alrxght”, and so on.
You can combine characters within brackets as well as use multiple brackets in the same line of regex. [AB]r[i1]gh[tuvwxyz]
is a valid piece of regex. Hopefully, though, it doesn’t look quite as chaotic as it might have a few minutes ago!
Ranges can broaden your search
The next bit of regex that’ll be useful with Shortcuts is the range. Ranges allow you to specify a range of characters that you’ll accept.
In the previous section, you may have noticed that my brackets included a lot of consecutive letters. The longest was [tuvwxyz]
. Those letters appear in the alphabet in that same order, right next to each other.
That means that I could use a range instead of typing them out. That would look like this:
Alrigh[t-z]
This piece of regex code will do the same thing as Alrigh[tuvwxyz]
. It’s just neater and easier to write.
You could replace that same range with [a-z]
if you wanted it to accept any lowercase letter from the alphabet. Or you could use [0-9]
if you wanted to accept any single-digit number.
You can also combine ranges within the same bracket. For instance, this Alr[i-ux-z]ght
will accept “Alright”, “Alroght”, “Alrxght”, and “Alryght”, but it won’t accept “Alraght” or “Alrvght”.
There are other variations of the word “Alright” that this code will accept, by the way, and many more that it won’t. That’s just a short selection to keep things, well, short.
If you’re having a hard time understanding what [i-ux-z]
means, it might help to see it written like this:
[i-u,x-z]
That isn’t correct regex syntax – you shouldn’t use a comma to separate ranges. But hopefully, that helps it make more sense!
You don’t need commas in regex to separate ranges and you don’t have to put ranges right next to each other. You could change it to [i-uabcx-z]
. This would accept the same ranges as before plus the characters “a”, “b”, and “c”.
How to exclude words and characters from your regex searches with Shortcuts
Ok, so now we’re getting somewhere! If you’ve followed this article up to this point, you should be able to look at the code below and understand what it is matching for:
Ap[p-r]le[Tt]ool[BbLF]ox
If you can read it, then you know that piece of regex code includes a lot of possible variations of the word “AppleToolBox”. So what if we wanted to reduce the number of variations it accepts without altering our range?
That’s where the “not” character comes in. It looks like this: ^
. If you’re having a hard time finding it on your keyboard (like I did), hold shift and press the 6 key on your keyboard.
To use the ^
character, place it at the beginning of the character you want to exclude.
There is a catch! The ^
character does not work outside of a regex function. You can’t just place it in front of the letter “A” to have it exclude that letter from your search. The regex code ^A
will just search for a capital “A”.
Instead, combine it with brackets and other regex special characters.
For example, if I wanted to search for any instance of the word “Alright” that doesn’t start with the letter “A”, I would use the code [^A]lright
.
You can even combine it with ranges! Just put it at the beginning of your bracket, and anything within that bracket, ranges included, will be excluded from your search. Like so:
What if you want to exclude a specific word from your search?
I had a hard time finding this information. A Stack Overflow user did have the solution, though, and it looks like this:
^(?!(word)$).+$
Just replace word
with whatever word you want to exclude from your search. Like so:
You can read that Stack Overflow post here if you want to learn more on this specific use case.
Wildcards can give you more search options
That brings us to wildcards. The wildcard character, which is a period .
, is used to represent any single character, bar none. If you just type .
as your regex code with Shortcuts, it will return every single character in a body of text as an individual match.
I wouldn’t recommend using it for that purpose, of course! Instead, I recommend using it in place of a single character in a word. For example, Alr.ght
will match “Alright”, “Alrxght”, “Alr<ght”, “Alr8ght”, and “Alr$ght”.
And that’s pretty much it! The wildcard character is pretty easy to understand. It matches everything! That makes it helpful for finding strings that match a specific format while having unique characters.
Emails, for example, are all going to look pretty similar without being the same. The wildcard can help you combine elements you know are going to be there (like “.com” and “@”) with characters that you don’t know (like “my_email567”, iCloud, or “Gmail”).
Another interesting use case is using the .
character to find strings of a specific length.
For instance, if I want to find every four-character string in a body of text, I could use ....
with a space on either side.
And here are all of the seven-character strings in that same body of text:
Note that this isn’t a perfect method for finding strings of a certain length. As you can see in the above examples, some strings are matched that shouldn’t be, and some that should be have been ignored. It’s just interesting to remember that you can use the .
character to count characters.
Also, bear in mind that the .
is a special character in regex. That means you’ll need to add a \
in front of it if you want to search for periods. That means you’d have to use Alright\.
to match “Alright.”
Use quantifiers to specify the length of text you’re looking for
Alright, so you can technically use the .
character to find a string that takes up a specific number of characters. Most of the time, though, you’ll want to be more specific.
That’s where quantifiers come in. Quantifiers allow you to specify the length of string you’re looking for when using regex with Shortcuts.
For example, say you want to find any word that is specifically three letters long. To specify that, you’ll want to use these brackets:
{}
When you place these brackets after these []
brackets, you’re specifying that you want a string that matches the number of characters inside of this {}
and the range of characters specified in this []
.
I’m sure that doesn’t make much sense now, so let’s look at an example!
Say you want to find any years mentioned in a body of text. Since a year consists of four numbers (obviously not every year from all time, just follow me here), you could use this code to match years within that text:
[0-9]{4}
This code is saying that we want a string made up of characters from 0 through 9 that is specifically four characters long. You can see how it locates this specific string in the following screenshot:
I should note that there are some issues with this regex code, and that’s that it doesn’t account for spaces or punctuation. So if the code finds a number more than four characters long, like “12345678”, it will find the string “1234” and the string “5678”.
To fix this problem, you would want to add a space to the beginning of the code and a bracket after the {4}
that contains another space, a period, a question mark, a comma, and an exclamation point. That way, it will overlook long strings of numbers without missing strings of numbers that have punctuation at their end instead of a space.
You might also want to use quantifiers to specify more than one length of string. For instance, maybe I want to find a string four characters in length, but also seven and eleven, too. Here’s what that would look like:
[a-z]{4,7,11}
There are a few more quantifiers you’ll want to know about
Ok, so there are more quantifiers still! These last few quantifiers are for when you want to specify the length of a string without being too specific.
For instance, say you want to find a string of any length that regex can match. Like a name! Names (in Western countries) start with one capital letter and end with a random amount of lowercase letters, followed by a space. To find a name, you would write the following code:
[A-Z][a-z]*
[A-Z]
specifies that the first character of the string should be a capital letter. [a-z]*
specifies that the rest of the string should be made up of lowercase letters, but it doesn’t matter how many letters follow. And the space at the end means that it will end the match once it finds a space at the end of the lowercase letters.
A golden combo in regex is .*
. That means match any character infinitely. In other words, it’ll match the entire body of text as one item.
The next quantifier you’ll need to know is +
. This one is just like *
except that it won’t match a string with zero characters. *
will match any length of string, which includes strings that have no length. +
, on the other hand, needs a string with at least one character or more.
Lastly, there’s the ?
quantifier. This is an odd one. It specifies that a string is either zero characters in length or one character in length. That’s it – either nothing or just one. So if you use the code [a-z]?
with a space at the beginning and end, it’ll look for single letters within a body of text.
Search for characters at the beginning and end of a string of text
We’re nearing the end of our guide on using regex with Shortcuts! There are just two more kinds of regex code you’ll use with Shortcuts.
The first are characters that allow you to match strings based on how they begin and/or end.
When it isn’t in brackets, the ^
character’s role changes from meaning “exclude” to “begins with”. It specifies that a string should begin with whatever you want. For instance, if you write ^A
, that would match the letter “A” in the strings “Alright”, “Apple”, and “A”.
It doesn’t match the whole word, though. For that, you would need to change it to ^A[A-Za-z]*
. That will match the first word of a paragraph/string, so long as that word starts with a capital “A”.
As a side note, you can write [A-Za-z]
as [A-z]
. It means the same thing, I just find that the first is a bit clearer when you’re learning.
To specify the end of the string, you’ll want to use the $
character. It works the same as the ^
character. The only difference is you write it at the end of a bracket/string rather than the beginning.
For example, if you wanted to find strings/paragraphs that end with “le”, you would use the code [A-z]*le$
. That will match “Table”, “apple”, and “capable” so long as they are at the end of a string or paragraph.
Regex will even deny this match if there is a space or punctuating mark at the end of the string. “Table.” won’t get matched by this code.
To fix that, you can factor in punctuation. This code accounts for various forms of punctuation and spacing that could occur at the end of a string, including a punctuating mark followed by a space:
[A-z]*(le[\.\?!, ]?[ ]?)$
That code will match “Able”, “table.”, “stable “, and “capable? “.
Store text strings using the grouping function of regex with Shortcuts
Alright! You’ve made it to the end of our AppleToolBox guide on using regex with Shortcuts. There’s just one more regex function left to learn, and that’s grouping.
Grouping is arguably the most important feature of regex as it’s what allows you to do things with the regex code you write. Without it, regex is just a search feature. It can only tell you if a string exists within a larger body of text, i.e., it’ll return “true” or “false”.
With grouping, however, you can store the results of your regex code. And that means you can copy matches, store them in variables, replace them with other text, modify their formatting, and everything else you would want to do with regex.
Fortunately, grouping is super easy! Just put whatever you want to group in parentheses ()
. Whatever you put in parentheses will be treated as a group.
If you put an entire line of regex code inside of parentheses, like (.*@.*\..{3})
, then that group will be remembered by your code, which will allow it to be recalled later down the line.
It’s important that you only use groups whenever you need to. Since they’re stored in memory, they can cause your code’s performance to decrease. Save groups for when they’re needed!
You can use groups for organization, too
You can also use groups to organize your regex code with Shortcuts. When you do this, the group inside the parentheses won’t necessarily be remembered.
For instance, say I want to match the word “Hello”, except that I don’t care what the last letter is. It can be any lowercase or uppercase letter or even a number. “Hell3838djdjajaksks” and “Hello” should be counted as matches. “Hell”, on the other hand, should not be counted.
To make this work, I write the code Hell[A-z]|[0-9]+
. But this is the result I get:
The reason it isn’t matching the way I expected is that the +
is only being applied to the [0-9]
bracket. I need it to apply to both brackets.
Additionally, this code is saying that I want either Hell[A-z]
or [0-9]
. So it’s matching for words that start with “Hell” and end with a letter, or it’s looking for any strings of numbers. What I actually need is for it to match instances of the word “Hell” that end with a letter or a number.
To fix this, I can use a group and rewrite the code as Hell([A-z]|[0-9])+
. Now, it’s looking for the word “Hell” followed by any letter or number. And because the +
is applied to both brackets, it can be any combination of letters and numbers, as long as there is at least one letter or number present.
As you can see in the screenshot below, this group solves my problem without necessarily storing the information within that group:
Now what?
And that’s it! That is nearly everything you could ever want to know about using regex with Shortcuts. Hopefully, you feel confident enough to start experimenting with regex now, even if it didn’t make sense to you at first.
Now that you know the basics of regex, you’re ready to start using it in your Shortcuts! Shortcuts accepts regex input in the following actions:
- Match Text
- Replace Text
Using these two Shortcuts actions, you can insert regex into your Shortcuts.
Pair this with the automation capabilities of Shortcuts, and you have a pretty powerful tool at your disposal.
You can use regex to make formatting text in Shortcuts easier, to pull information from emails, texts, websites, files, and calendar events, create text that follows a specified format, check that input was entered correctly, and more.
For example, say you want to match for emails. Maybe you need to check that a string of text is an email, or maybe you want to pull an email(s) from a body of text.
How would you break this down?
Well, you know that the basic structure of an email will be some combination of letters, numbers, and characters, followed by the “@” symbol, then followed by the name of a website like Gmail or iCloud, which is then followed by a “.com”, “.org”, or some other kind of three-character top-level domain.
To write that in regex, you need to specify that you want a string of at least one character long that is immediately followed by the “@” symbol, then another string of at least one character, followed by a “.”, then followed by a string of three characters. That would look like this:
.+@.+\..{3}
If you paste this into the Match Text or Replace Text actions in Shortcuts, you’ll have an automation that can find, store, and manipulate an email address.
You can use this kind of problem-solving to come up with your own regex solutions or to find some that others have made online!
Start using regex with Shortcuts to take your automation to the next level
And that, friends, is really it. I hope you enjoyed following along with this article! This is one of the more ambitious pieces I’ve ever written for AppleToolBox. I had to teach myself regex to write it, and I hope that in doing so, I was able to help you learn it.
Using regex with Shortcuts is no different than learning how to do anything else on your smartphone or computer. Just put in some time and patience, and eventually, you’ll get there.
For more guides, tutorials, and news on all things Apple, check out the rest of the AppleToolBox blog.
Alright [A-Z][a-z]+
, I’ll see you next time!
Write a Comment