Regular Expression Syntax Primer

Learn the basic syntax of regular expressions using method signatures.

Regular expressions are one of those topics that often feel obscure, intimidating, or too difficult to grasp; most of these descriptions can largely be attributed to the difficulty in reading nontrivial regular expressions. However, despite this, they are a straightforward yet powerful way to express search patterns that can be applied to text. Throughout this course, we have used several regular expressions to help us achieve our goals in one way or another. For example, we have used regular expressions often to quickly scan text input to locate all instances of a particular pattern and to remove substrings, amongst other things. However, we have not taken time to step back and explore regular expressions themselves.

Get hands-on with 1400+ tech skills courses.