Frequently Asked Questions
What are regex flags?
Flags modify how the regex engine searches: g (global) finds all matches instead of stopping at first; i (case insensitive) matches regardless of letter case; m (multiline) makes ^ and $ match line start/end instead of string start/end; s (dotAll) makes . match newlines too.
How do I capture groups in regex?
Use parentheses to create capture groups: (\d{4}) captures a 4-digit sequence. In the match details below, you'll see Group 1, Group 2, etc. for each captured group in each match.
What does \b mean in regex?
\b is a word boundary anchor. It matches the position between a word character (\w) and a non-word character. \b\w+\b matches complete words. Without \b, patterns can match partial words.