How To Learn Regular Expressions (RegEx) Fast

Regular expressions can be confusing and perplexing, but if you’re a programmer or someone who loves to improve work productivity on the computer, then you’ll be happy to know that once you master regular expressions, a lot of time and effort can be saved (not to mention, you’ll be able to do some very cool things!)

First of all, let’s try to answer what a regular expression is. A regular expression (or regex or regexp, for short) is a way to match certain patterns in a piece of text. For example, you can create a regular expression to find any email address, or any phone number. This is incredibly powerful, because normal text-matching operations would require you to know, for example, the email domain at least, before you’re able to match it. Besides email addresses and numbers, regexs can be created that match characters, patterns, or any other characteristics that text can have.

A great way to test and try out regular expressions is with a regex tool. A free online regex tool is RegExr. I found RegExr while looking for a regex tool, and it’s fantastic because it allows you to instantly test and check your regular expressions, which is a good way to learn regular expressions.

​Read More