Sponsored
📖 Regex cheatsheet
. any char \d digit \w word \s space
\D \W \S negated versions
^ start $ end \b word boundary
* 0+ + 1+ ? 0/1 {2,5} range
*? lazy [abc] set [^abc] negated
(x) group (?:x) non-capturing
(?<name>x) named group \1 backref
x(?=y) lookahead x(?!y) negative
(?<=y)x lookbehind a|b alternation
Flags: g all i case m multiline s dotall u unicode
Sponsored
/* single ad unit — insert AdSense/Ezoic code here */
How it works
- Uses your browser's native
RegExpengine — the same one your JavaScript code would use. - Common flags:
g(global, find all matches),i(case-insensitive),m(multiline),s(dot matches newline). - Invalid patterns show an error instead of a crash.