Regular Expression Tester
Test regular expressions live against sample text. See matches, capture groups and flags highlighted as you type.
—
About this tool
Regular expressions are powerful but easy to get wrong. Testing them against sample input as you write is the fastest way to be sure they behave as intended.
Enter a pattern and flags, add test text, and every match is highlighted with its capture groups listed.
- Live matching as you type
- Support for flags such as g, i, m and s
- Numbered capture groups
Frequently asked questions
Which regex engine is used?
The JavaScript engine built into your browser, which follows the ECMAScript regular expression specification.
What do the flags mean?
g finds all matches, i ignores case, m makes ^ and $ match each line, and s lets . match newlines.
How do capture groups work?
Parentheses in the pattern capture parts of the match. Each captured value is listed for every match found.
Related tools
Epoch Converter — Timestamp to DateRead a Unix timestamp as a date, or get the timestamp for a moment you choose. Shows UTC and your local clock side by side.Hash Calculator — MD5, SHA-2 and SHA-3Hash a string with MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 and the SHA-3 family in one pass, then copy any result.Color Code Converter — HEX, RGB, HSLTranslate a color between HEX, RGB and HSL, preview the swatch and copy values formatted for CSS.Number Base Converter — Binary, Hex, DecimalType a number in any base and read it in the others at once, with support for very large integers and bases from 2 to 36.