Getting to know regular expressions
As we said previously, regEx, or regular expressions, can check, match, replace, and manage strings. A regular expression consists of encoded strings that we can use to find patterns in large amounts of data. Using regEx can save us many hours of work instead of using string operations, like the ones we learned in the previous sections. Also, this section will not be a deep dive into regEx as it deserves a book on its own.
Let's get started by opening Dynamo and creating a new file. If you've followed the previous section, you should have Clockwork already installed. If you didn't, open Package Manager and install the Clockwork package as it includes a few nodes that allow us to use regular expressions. As an example, let's see how we can take advantage of regEx to parse phone numbers. Let's say we have a list of phone numbers, and we want to check whether or not they match the following convention:
3 digits, 1 dash...