Regex tester (JavaScript)
Pattern-test with match highlighting and a saveable library.
About this tool
Tests a regular expression against sample text, highlighting the matches and letting you choose the flags. You can save patterns you reuse, with a label, to a small library that stays in your browser.
Good for
- Building a log-parsing or validation pattern against real samples
- Debugging why a pattern matches too much
- Keeping the handful of patterns you always end up rewriting
Not for
- Other regex dialects: this is JavaScript's engine, and PCRE, Python's re, Go's RE2, and POSIX grep all differ on lookbehind, possessive quantifiers, and escapes
- Parsing HTML, email addresses, or anything else with a grammar of its own