fjordtools / Text / Regex Tester
Regex Tester
Test JavaScript regular expressions with live highlighting, capture groups and a replace preview. Runs in your browser.
Pattern
Test string
Matches highlighted
Match list
Replace with
About Regex Testerhow it works and good to know
JavaScript flavor
This tester uses your browser's regular expression engine, so it behaves exactly like RegExp in JavaScript and Node. Lookbehind, named groups ((?<year>\d{4})) and Unicode property escapes work in current browsers.
Replacing
In the replacement, $1 inserts the first capture group, $& the whole match and $<name> a named group.
Runaway patterns
Matching runs in a background worker. If a pattern takes longer than 1.5 seconds, for example through catastrophic backtracking, it is stopped and you get a warning instead of a frozen tab.
Related tools
- JSON FormatterFormat, validate, minify and sort JSON.
- URL EncoderPercent-encode, decode and take apart URLs and query strings.
- Text DiffCompare two texts or JSON documents line by line.
- Base64Encode and decode text, with URL-safe and UTF-8 support.
- JWT DecoderRead the header, payload and expiry of a JSON Web Token.
- Timestamp ConverterUnix time to dates and back, in any time zone.