Regular Expressions: Greedy vs. Lazy Matching and Lookarounds

Constructing performant regular expressions without falling into catastrophic backtracking.

Published by EvriTool Editorial Team • Reading Time: 8 min read • Public Reference Guide (No Login Required)

Quantifiers: Greedy, Lazy, and Possessive

Understand how .* differs from .*? and why possessive quantifiers prevent regex engine stack overflows.

Lookahead and Lookbehind Assertions

Using positive (?=...) and negative (?!...) lookarounds to match context without including it in capture groups.


Explore More on EvriTool

Browse our complete open guide directory or access the interactive tools directly on the homepage.

View All 15+ Guides