Regex Tester.

Test JavaScript regular expressions live, with match highlighting and capture groups.

RUN
Highlight
Matches

Enter a pattern and test text to see matches.

status IDLE

how it works

  1. Type a JavaScript regular expression pattern and toggle flags g, i, m, s, u, y.
  2. Paste the text to test. Matches highlight live as you type.
  3. Inspect each match row for its index, full match and every capture group (numbered and named).
  4. Copy the formatted match list with one click.

flags and groups

This tester uses the browser's native RegExp — the same engine your JavaScript runs on.g finds all matches, i ignores case, m makes ^/$ match line starts/ends,s lets . match newlines, u enables Unicode mode and y is sticky (match only from lastIndex). Named groups ((?<name>…)) appear by name alongside their numbered positions.

Highlighting escapes HTML first, then wraps each exact match in <mark>, so< and & in your text never become markup. Zero-length matches (like \b or (?=a)) advance lastIndex by one to avoid infinite loops, and the match count chip reflects the true number of results.