Ω
OmniToolsv2.2
Isolated Web Worker Sandbox • ReDoS Protected

Regex Tester, Debugger & Match Inspector

Test, validate, and debug ECMAScript regular expressions in real-time with sub-millisecond match highlighting, capture group inspection, and 100ms ReDoS worker timeout defense.

Client-Side Web Worker Thread • 0 Server Calls • Instant ReDoS Terminate
WhatsApp
0 matches0.00 ms
//g
Expression Flags:
Common Patterns & Quick Presets1-click insert
Test String Canvas0 chars
Live Visual Highlighting
No matches found. Enter a valid pattern and test string above.

Detailed Match Table & Capture Groups

0 matches extracted
#PositionFull MatchCapture Groups
No matches found. Enter a valid pattern and test string above.
Privacy Verified0 Server Logs Saved100ms ReDoS Catastrophic Backtracking Guard
Isolated Worker Thread Active

Comprehensive Guide to ECMAScript Regular Expressions & ReDoS Defense

Regular expressions power validation, tokenization, and pattern matching across modern software development. Test complex patterns with complete confidence inside an isolated client-side worker thread.

1. Visual Matching & Capture Groups Architecture

Regular expressions (regex) define search patterns for string parsing, data validation, and text transformation. Modern ECMAScript engines support numbered capture groups `(pattern)` as well as named groups `(?<name>pattern)`, which segment matched substrings into structured key-value dictionaries. Visual highlighting allows developers to immediately verify boundary assertions, lookaheads (`(?=...)`), and greedy vs lazy quantifiers (`*?`).

2. Mitigating Catastrophic Backtracking (ReDoS)

Regular Expression Denial of Service (ReDoS) occurs when nested quantifiers such as `(a+)+$` are evaluated against non-matching strings (e.g., `aaaaaaaaaaaaaaaaaaaaaaaa!`). Standard Nondeterministic Finite Automaton (NFA) engines explore an exponential number of permutations, hanging the browser thread. OmniTools isolates every regex evaluation inside a dedicated Web Worker thread with a strict 100ms execution cutoff that immediately issues `worker.terminate()`, keeping your browser 100% responsive.

3. Unicode Standards & Multilingual Parsing

When parsing international scripts such as Arabic or Chinese, or 4-byte UTF-16 emoji surrogates (e.g. 🚀), standard byte-oriented regex engines misalign string indices. Enabling the `u` (Unicode) flag enables proper codepoint-aware character matching. OmniTools processes match slices against raw UTF-8 streams so start and end indices remain strictly synchronized across left-to-right and right-to-left UI layouts.

Frequently Asked Questions

How does OmniTools prevent browser freezing on unsafe regex patterns?

Every regular expression is executed inside an isolated Web Worker thread. If evaluation exceeds 100ms due to catastrophic backtracking (ReDoS), the worker is instantly terminated and an alert is rendered without locking up the UI.

What ECMAScript flags are supported?

OmniTools supports all standard flags: 'g' (global), 'i' (case-insensitive), 'm' (multiline), 's' (dotAll - '.' matches newlines), and 'u' (unicode aware).

Is my test string or regex transmitted to any backend server?

No. All compilation, execution, and visual highlighting are computed 100% locally within your browser's client-side memory.