Free tool

Regex tester, matches as you type.

Type a regular expression and some test text, and every match is highlighted as you type, with its position and each capture group, named groups included. Switch the flags on and off, preview a replace with $1 and $<name>, and start from common patterns like emails, URLs and dates. It runs your browser's JavaScript regex engine, so patterns for other languages can behave a little differently.

//

    
            

    Start from

    Tested in your browser. Your pattern and text are kept in this browser and never sent anywhere.

    See what matches

    Every match, every group.

    01 / Live

    Highlights as you type

    Matches are marked in the text, alternating colours so neighbours stand apart.

    02 / Groups

    Numbered and named

    Each match lists its capture groups, and (?...) groups by name.

    03 / Replace

    Preview the result

    Use $1, $2, $& and $ in the replacement and see the new text at once.

    Questions

    Good to know.

    Which regex flavour does it use?

    JavaScript's, built into your browser. PCRE, Python and others are close but differ in places like lookbehind and named groups.

    What do the flags do?

    g finds every match, i ignores case, m makes ^ and $ work per line, s lets . match new lines, u turns on full Unicode, y matches only at the last position.

    Why does my pattern match nothing?

    Check escaping: a backslash in the pattern box is just one backslash, unlike in many code strings.

    Can I use named groups?

    Yes: (?\d{4}). They are listed by name.

    Is my text sent anywhere?

    No.