Regex tester
Build and debug regular expressions for log parsing, alert rules, nginx locations or input validation. Matches update as you type.
Runs in your browser
g all matches · i ignore case · m ^ and $ per line · s dot matches newline · u Unicode · y sticky
Matches
Replace
Notes
- This uses JavaScript regex syntax. It is very close to PCRE (grep -P, nginx, PHP) and Python, but not identical: possessive quantifiers and some lookbehind forms differ between engines.
- Patterns that take too long (catastrophic backtracking, such as
(a+)+$) are stopped after 1.5 seconds instead of freezing the page. - Prometheus and Go (RE2) do not support lookarounds or backreferences, so avoid them if the pattern is going there.