0PricingLogin
NLP Academy · Lesson

Regex in 5 Minutes

Literals, classes, and quantifiers.

A Tiny Language for Patterns

A regular expression is a tiny pattern language for matching text. Instead of one fixed word, you describe the shape of what you want to find.

Python Speaks Regex Too

Python uses the built-in re module for regex. Import it once and you can search, match, and extract patterns from any string.

import re
re.search("cat", "the cat sat")

All lessons in this course

  1. Regex in 5 Minutes
  2. Finding Emails and URLs
  3. Capturing Groups and Replacements
  4. Regex Tokenization Tricks
← Back to NLP Academy