Skip to tool
FeuTex · free tools runs in-browser no bloat built by LiMiT

Regex Checker Online

Test a JavaScript (ECMAScript) regular expression against your text and instantly see matches, capture groups, indices, and any syntax errors. Use it as a quick regex validator, matcher, and optional replace preview.

Category: Developer · URL: /tools/regex-checker-online.html
Supported by JS engines: g i m s u y (others may error depending on your browser).
Use JS replacement syntax like $1, $&.

        
Tip: If you don’t use g, the tool reports only the first match (like RegExp.exec without global looping).
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Paste your text, enter a pattern and flags, then run the checker.

  1. Enter your regex pattern (without surrounding / slashes).
  2. Set flags (for example: gim).
  3. Paste the test text.
  4. Click Check matches to see matches and groups, or Replace preview to preview a replacement.
Keywords this page targets (natural cluster): regex checker online, regex tester online, regular expression checker, regex validator, test regex against string, javascript regex tester, regex match checker, regex find matches online, regex capture groups tester, regex replace tester, regex flags tester, regex error checker, regex match all online, online regexp tester, validate regular expression, regex debugging tool, regex match index, regex exec tester, check regex pattern, regex playground
Secondary intents covered: Validate a regex pattern and see the exact compilation error, Find all matches in a text with chosen flags (g/i/m/s/u/y), Inspect capture groups (numbered) for each match, See match positions (index and end) to debug boundaries, Preview what a replacement would produce before using it in code, Copy match results as JSON for sharing or bug reports, Understand how flags change results (e.g., g vs non-g, m), Test tricky cases like empty-string matches without infinite loops

FAQ

Does this regex checker use PCRE or JavaScript regex?

It uses JavaScript RegExp (ECMAScript), so some PCRE features may not work.

Should I include the leading and trailing slashes like /abc/ ?

No—enter only the pattern (for example abc) and set flags separately.

Why do I only see one match sometimes?

If you don’t include the g flag, the tool shows only the first match (like a single exec).

Can I test capture groups?

Yes. The output lists numbered capture groups for each match, and named groups if your browser supports them.

What happens with empty-string matches (like ^ or .*?)?

The tool guards against infinite loops by advancing the index when a match is empty.

Is my text sent to a server?

No. Matching and replace preview run locally in your browser.

How do I preview a replace result?

Fill the Replacement field and click Replace preview; the output includes the replaced text (truncated if very large).