A regular expression (regex/regexp) is a powerful notation for representing string patterns. It's used to search, extract, or replace strings matching specific patterns.
Literal: `abc` → Exact match "abc"
Dot `.`: Matches any single character
Asterisk `*`: 0 or more repetitions of preceding character
Plus `+`: 1 or more repetitions of preceding character
Question `?`: 0 or 1 occurrence of preceding character
Quantifier `{n,m}`: n to m occurrences of preceding character
Character class `[abc]`: Matches a, b, or c
Negation `[^abc]`: Matches any character except a, b, c
Start anchor `^`: Matches start of line
End anchor `$`: Matches end of line
Group `(abc)`: Grouping and capture
Alternation `a|b`: Matches a or b