Regex Tester

Write a JavaScript RegExp pattern, set flags, and test against sample text. Matching runs locally in your browser.

All processing on this page runs locally in your browser unless noted otherwise.

Modifiers

Engine: JavaScript RegExp (not PCRE / .NET).

//gi

109 characters

Highlight preview

0 matches · 0 groups · 0 ms

Contact [email protected] or [email protected]
Phone: 13812345678
https://regex.toolsworkbox.com/regex

Match results

#MatchGroupsRange
No matches yet.

Code snippets

Illustrative snippets for other languages. This page still matches with JavaScript RegExp.

const pattern = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}/gi
const text = `your test text`
const matches = [...text.matchAll(pattern)]
console.log(matches.map(m => m[0]))

Choose a tab to load advanced tools (lazy-loaded).

How to use

  1. Enter a pattern (no wrapping slashes) and choose flags.
  2. Paste test text; matches update after a short debounce, or press Ctrl+Enter.
  3. Use templates, history, and code snippets as needed. Share via the URL query.

FAQ

Which regex engine is used?

JavaScript RegExp in your browser. Snippets for PHP/Python are examples only.

Is my text uploaded?

No. Matching runs locally. Drafts and history stay in localStorage on your device.

Why did highlighting turn off?

Texts over 8000 characters skip inline highlight to keep the page responsive; the results table still works.

Related tools