Moayyad Faris
Text Utilities

Processed locally in your browser — not uploaded

Regex Tester

Write a pattern, choose flags, and see matches highlighted live against your test text — with capturing groups (numbered and named) broken out for each match. Runs entirely in your browser using JavaScript's own regex engine, so behavior matches exactly what you'd get in code.

//g
01

How to use

  1. Enter a pattern and choose flags (g for all matches, i for case-insensitive, m for multiline, s for dotAll).
  2. Paste test text — matches are highlighted live as you type.
  3. Capturing groups (numbered and named) for each match are listed below the highlighted text.
02

Understanding the output

Without the g (global) flag, a regex only reports its first match, matching real JavaScript behavior. Add g to find every match in the text.

03

Common issues & tips

  • Only one match found: check whether the g flag is enabled — without it, regex engines stop after the first match.
  • "Invalid regular expression": usually an unescaped special character or an unclosed bracket/parenthesis.

Frequently asked questions

Why do I only get one match?
Without the g (global) flag, JavaScript regex only returns the first match — this matches real code behavior. Enable g to find every match.
Does this support all regex features?
It uses JavaScript's native RegExp engine directly, so it supports everything JavaScript regex supports, including named capturing groups and lookaheads/lookbehinds.
Is my text sent to a server?
No. Matching happens entirely in your browser.

Related tools