Dad’s Words tools

Regex Tester

Test regular expressions against text — matches, positions, and capture groups shown instantly.

//
Test Text
Matches

Enter a regex pattern above and paste text to test it

Pattern input and flags

Type the pattern between the "/" delimiters in the pattern strip at the top. The four available flags are g (global — find all matches, always enabled), i (case-insensitive), m (multiline — ^ and $ match line boundaries), and s (dotAll — . matches newlines). Click any flag letter to toggle it. Errors in the pattern are shown inline next to the match count badge.

FlagEffectDefault
gFind all matches, not just the firstOn (always)
iCase-insensitive matchingOn
m^ and $ match line starts and endsOff
s. matches newline characters tooOff

Reading the match results

Each match card shows the matched string, its character offset within the test text (labeled @), and any capture groups ($1, $2, …) if the pattern uses parentheses. Up to 200 matches are displayed. If the pattern produces more, a note below the list shows the total. Capture group values show "undefined" for optional groups that did not participate.

Warning: A pattern without the g flag still runs globally internally — the tool always uses matchAll. Patterns that can match zero-length strings (like .* or a*) may produce a very large number of matches and make the panel slow to render.

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Words tools

Search the Words tools