🔤

Regex Tester

Test ECMAScript regular expressions, inspect matches and captures, and try replacements in your browser.

Enter “Pattern”, “Flags” and test text, then use “Test”. Enter “Replacement” to inspect the replacement output. Method and limits

Flags
Options
Presets

Matches

Elapsed (ms):

Matches:

Regex reference

Dependency licenses

Method and limits

Method and limits

ECMAScript RegExp runs only in a disposable worker. Supported browser flags are dgimsuvy; duplicate flags and u with v are invalid. Indices count UTF-16 code units; u/v zero-width progress advances a Unicode code point. Unmatched captures differ from empty captures. Global matching collects at most 5000 matches; a further match marks the preview incomplete and disables replacement. Replacement is built once from complete matches, supports $$, $&, $1–$99, named groups, prefix and suffix tokens, and allows an empty result. No match preserves the original text. Presets are learning heuristics, not full email, URL, IPv4 or HTML validators. This is not PCRE or RE2.

Tool input is processed locally in a worker, without uploads, storage or source logging. Ads and the rest of the site may make network requests. Assets must load first; offline operation is not guaranteed.

Text 200000 UTF-16 units; pattern/replacement 10000 each; 5000 matches; message/output 2 MiB UTF-8. Startup 5 s, matching plus replacement 1 s.

Copied

Copy failed. Select the result and copy it manually.

Embed this tool on your website

Use whole pixel dimensions from 1 to 4096.

× px (1–4096)

                        

💡 Integration Tip

Copy the embed code and paste it into your website HTML. The responsive version adapts to all screen sizes automatically.

5.0
3 ratings
✓

Popular Tools

No more tools to show
Explore All Tools

About Regex Tester

Test ECMAScript regular expressions, inspect matches and captures, and try replacements in your browser.

(cat), g; cat dog cat → X dog X; 0, 8

Versioned technical method; no calendar or legal reference year applies.

Use Cases

Testing regex patterns before coding
Debugging complex expressions
Learning regular expressions
Validating pattern matches
Extracting data from text

How to use

1

Enter your regex pattern

2

Enter “Pattern”, “Flags” and test text, then use “Test”. Enter “Replacement” to inspect the replacement output.

3

Paste test text below

4

Inspect “Matches”, “Captures” and “UTF-16 index”; “Copy” copies the replacement output.

5

Use “Clear” to empty the draft and result; “Cancel” stops current work.

Pro Tips

  • Use flags: g (global), i (case-insensitive), m (multiline)
  • Test with edge cases
  • Start simple and build complexity
  • Review warnings and the output before copying. A successful transform is not proof of compatibility with your application.

Frequently Asked Questions

Regular Expression - a pattern language for matching text.

Check flags, escaping special characters, and pattern logic.

Parentheses () capture part of the match for extraction.

ECMAScript RegExp runs only in a disposable worker. Supported browser flags are dgimsuvy; duplicate flags and u with v are invalid. Indices count UTF-16 code units; u/v zero-width progress advances a Unicode code point. Unmatched captures differ from empty captures. Global matching collects at most 5000 matches; a further match marks the preview incomplete and disables replacement.

Replacement is built once from complete matches, supports $$, $&, $1–$99, named groups, prefix and suffix tokens, and allows an empty result. No match preserves the original text. Presets are learning heuristics, not full email, URL, IPv4 or HTML validators. This is not PCRE or RE2.

FreeWebTools AI
Powered by free AI models · Full chat →