How is a pattern evaluated?
The component creates a module Web Worker for each deferred pattern, flag, and test-text evaluation. It terminates the worker after a result, error, or timeout.
Test regular expressions, flags, and capture groups directly in your browser.
Preparing the editor...
The guide and instructions on this page are available while the tool loads.
Regex Tester runs your pattern against sample strings and highlights matches, flags, and capture groups before you commit code.
Use it to debug email, URL, and ID validators, or to see how global and case-insensitive flags change results.
Everything evaluates locally. Use synthetic test data instead of production customer records when possible.
Typical tasks this tool is built for.
Regex matching runs locally in your browser. Patterns and sample text are not uploaded.
Practical tips before you download or share the output.
Be careful with very complex regular expressions on very large input text, as they can become slow to evaluate.
Longer reads that pair well with this tool.
Common next steps after using this tool.
Automatically format and validate JSON in your browser.
Create QR codes for URLs, plain text, email, phone numbers, and Wi-Fi credentials in your browser.
Generate strong random passwords directly in your browser.
Encode and decode Base64 text directly in your browser.
Format or minify SQL queries directly in your browser.
Decode JSON Web Tokens directly in your browser.
Situations where this workflow saves time.
The component creates a module Web Worker for each deferred pattern, flag, and test-text evaluation. It terminates the worker after a result, error, or timeout.
The component’s timeout is 300 milliseconds. On timeout it terminates that worker and shows a timeout result, but it cannot guarantee that the same pattern is safe elsewhere.
The UI provides g for global, i for ignore case, m for multiline, s for dotall, and u for unicode. The worker filters its received flags to supported JavaScript flags.
Patterns over 1,000 characters produce an error. Test text longer than 20,000 characters is truncated to its first 20,000 characters for the evaluation.
The worker stops collecting after 500 matches. The highlighted preview also stops at that cap, so later matches in the test text are not listed in that run.
Yes. Each listed match includes its capture groups when the expression has them. Empty group values are shown as empty in the results list.
In JavaScript regular expressions, dot does not include line terminators unless the dotall s flag is enabled. Select s before evaluating that case.
It copies the displayed matched text values joined with line breaks. It does not copy the pattern, flags, indexes, or capture-group labels.
No. The component has no replacement input, replacement preview, or replace action; it evaluates matches and capture groups only.
Browse related tools or open the full workspace.