Tools · Beginner to advanced

Regex Cheat Sheet PDF: Regular Expressions from Basics to Lookarounds

Every pattern, modifier and trick.

  • 37 pages
  • 50+ syntax items
  • 100+ examples

About this note

The Regular Expressions Master Sheet is a 37-page PDF covering 50+ syntax items with more than 100 examples, including tricky confusion cases.

It follows PCRE / ECMAScript style syntax, notes where Python, JavaScript and Java differ, and includes a real-world pattern library, a one-page cheat sheet and practice problems with solutions.

Who is it for?

  • Developers and CSE students
  • Students preparing for coding interviews
  • Anyone who validates or extracts text

What you will learn

  • Use literals, the dot and character classes
  • Apply quantifiers: greedy, lazy and possessive
  • Use anchors, boundaries, groups and alternation
  • Write lookaheads, lookbehinds and backreferences
  • Set flags and match Unicode
  • Use ready patterns for email, URL, date and more

Contents: 18 chapters

  1. Introduction to Regular Expressions
  2. Literals and Basic Matching
  3. The Dot — Any Character
  4. Character Classes
  5. Quantifiers
  6. Anchors and Boundaries
  7. Grouping and Capturing
  8. Alternation
  9. Escaping Special Characters
  10. Lookarounds (Zero-Width Assertions)
  11. Backreferences
  12. Flags and Modifiers
  13. Unicode and Codepoint Matching
  14. Greedy vs Lazy vs Possessive — Deep Dive
  15. Advanced Constructs
  16. POSIX Character Classes
  17. Real-World Pattern Library
  18. Common Mistakes and How to Fix Them

What is included

  • Real-world pattern library
  • 10 common mistakes and fixes
  • One-page cheat sheet
  • Practice problems at three levels with selected solutions

Frequently asked questions

Which regex flavour does the note follow?

PCRE / ECMAScript style syntax, with notes where Python, JavaScript and Java differ.

Does it include ready-made patterns?

Yes. A real-world pattern library covers email, URL, dates, time, IPv4, hex colour and more.

What is the difference between greedy and lazy regex?

A greedy quantifier matches as much as possible, and a lazy one (with a ?) matches as little as possible. For example, <.*> matches a whole line of tags while <.*?> matches one tag at a time.

What are lookarounds in regex?

Lookarounds are zero-width checks for what comes before or after a position without consuming characters. There are positive and negative lookahead and lookbehind.

How do I buy this note?

Pay the amount shown on this page to our official bKash number using Send Money, then fill in the order form with your TrxID, sender number, full name and email. Full steps are in the How to buy section on sendnotes.online.

When will I receive the PDF?

After your payment is verified, a Drive link to your personal PDF is emailed to you within 12–24 hours.

Why is my PDF watermarked?

Your name and email are placed on every page to protect the notes from piracy, so please enter them accurately in the form.

Is the discount still on?

The price on this page already includes the current discount. It is a limited offer, so the price may return to normal later.

Related notes