Skip to content

Regex Tester

Test regular expressions with real-time match highlighting and capture group extraction. Free and private.

FreeNo SignupNo Server UploadsZero Tracking

Regex Tester

Test regular expressions with real-time match highlighting and capture group extraction.

Pattern
//g
Test String
Embed code
<iframe src="https://devcraft.tools/embed/regex-tester" width="100%" height="600" frameborder="0" title="Regex Tester - devcraft"></iframe>
<p style="font-size:12px;text-align:center;margin-top:4px;">
  <a href="https://devcraft.tools/tools/regex-tester" target="_blank" rel="noopener">Powered by devcraft</a>
</p>
Attribution preview

Powered by devcraft

How to Use Regex Tester

  1. 1

    Enter a regex pattern

    Type your regular expression in the pattern field. You can also pick a common pattern from the dropdown.

  2. 2

    Set flags

    Toggle the flags you need: g (global), i (case insensitive), m (multiline), or s (dotall).

  3. 3

    Type your test string

    Enter the text you want to match against. Matches are highlighted in real time as you type.

  4. 4

    Review results

    See all matches highlighted in yellow, with detailed match info and capture groups listed below.

Frequently Asked Questions

This tool uses JavaScript's native RegExp engine, which supports most common regex features including lookahead, lookbehind, named capture groups, Unicode property escapes, and more.

g = global (find all matches), i = case insensitive, m = multiline (^ and $ match line boundaries), s = dotall (. matches newlines including \n).

JavaScript regex syntax is largely compatible with most languages, but there are subtle differences. This tool uses the JavaScript regex engine specifically. Features like possessive quantifiers or atomic groups are not available.

Yes. All regex matching happens in your browser. No data or patterns are sent to any server.

Capture groups are portions of the regex enclosed in parentheses (). They capture the matched substring so it can be referenced later. This tool displays all capture groups for each match.