Skip to content
EN
English 简体中文 soon 日本語 soon
Run here 100% in your browser, no upload, no login

Regex Tester

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

Matches & capture groups

Replace preview

 

How to use it

  1. Type your pattern (for example (\d{4})-(\d{2})-(\d{2})) into the pattern box.
  2. Choose flags — g for global, i for case-insensitive, m for multiline.
  3. Watch matches highlight live as you type in the test text.
  4. Open Matches & capture groups to see what each group captured per match.
  5. Enter a replacement to preview String.replace output.

Common use cases

FAQ

Q: Which regex dialect is used? A: The JavaScript RegExp engine (ECMAScript). It is close to PCRE for everyday patterns but differs on some advanced features — test anything ported from another language.

Q: My pattern matches in another tool but not here — why? A: Differences usually come from flags (the g flag changes match iteration) or from engine-specific features. Check flags first, then the pattern itself.

Q: Can I test Unicode and Chinese text? A: Yes. JavaScript regex operates on UTF-16 code units; for broad character matching use the u flag and escapes like \p{L} with a recent browser.

Used in these workflows

Your data stays on this device

Regex Tester runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.