Whether you need to scrape email addresses from a set of HTML documents or scour massive logfiles for needle-in-a-haystack errors, regular expressions provide a powerful tool for searching text.

Because they are primarily composed of sequences of tokens with somewhat non-obvious meanings, regular expressions (or regexes) can be daunting to decipher. The moderate learning curve to understand how to craft an accurate regex is highly worthwhile and has the potential to save hours of manually text searching.

This post aims to provide a clear walkthrough of the most commonly used components of regex syntax. While there are numerous cheatsheet style…

Edward Saavedra

Full stack software developer by day. Writer, illustrator, and general creative dabbler by night.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store