FreeDev Tools

Regex Tester

Live regular expression tester with match highlighting, group capture, and flag controls.

Flags:

Frequently Asked Questions

What are regex flags? +

Flags modify how the regex engine searches. g finds all matches instead of just the first. i makes matching case-insensitive. m makes ^ and $ match the start/end of each line rather than the whole string.

What are capture groups? +

Capture groups are defined with parentheses (). They let you extract specific sub-parts of a match. For example, (w+)s(w+) captures two words separately from a two-word match.

Why does my regex not match? +

Common reasons: missing the g flag when expecting multiple matches, incorrect escaping of special characters, or case mismatch without the i flag. Check the error message shown if the pattern is invalid.

Is my data sent to a server? +

No. All regex testing runs entirely in your browser using JavaScript's built-in RegExp engine. Nothing is transmitted to any server.

How to Use

  1. 1

    Enter your pattern

    Type your regular expression in the pattern field. Select flags (g, i, m, s) as needed.

  2. 2

    Enter test text

    Paste the text you want to test against. Matches are highlighted in real-time as you type.

  3. 3

    Review matches and groups

    See all matches listed below with their positions and any named or numbered capture group values.

Frequently Asked Questions

JavaScript regular expressions (ECMAScript). This covers the vast majority of regex syntax including lookaheads, backreferences, and named capture groups.