Introduction
In your career as a developer, you will often find a search for information to be a logical first step to problem-solving: searching for documentation, searching for a specific line of code, or just making a program that extracts information from a given body of text into data that the program can understand.
A regular expression is a specific language for defining these search rules, much like Java is a language to construct programs. The syntax can be quite complex. When you see a regular expression for the first time, it can be daunting.
The following is a very basic pattern matcher for an email address construction, with many flaws:
/.+\@.+\..+/
If you're seeing this for the first time, you might think that it's a typographical error (or that a cat was involved). However, it's perfectly legitimate code. We'll dive deeper into the construction of this example shortly, but first, let's take a look at a more thorough pattern-matcher...