. any char · \d digit · \w word char · \s whitespace
* 0+ · + 1+ · ? 0-1 · {3} exactly 3 · {2,5} 2 to 5
(...) capturing · (?:...) non-capturing · (?=...) lookahead · (?!...) negative lookahead
Check regex syntax. Common issues include unescaped special characters (. * + need \), mismatched brackets, misplaced quantifiers. Start simple and add complexity.
g (global) enables multiple matches. Without it, only the first match is found. Other flags: i (case-insensitive), m (multiline), s (dotAll), u (unicode).
Use $1, $2, $3 for capture groups 1, 2, 3. $& references the full match, $` the text before match, $' the text after match.