Extract order numbers
Use \bORD-(\d{4})\b with g to find ORD-1042 and capture 1042 without accepting a two-digit order number.
Test a JavaScript regular expression against sample text without sending the pattern or text to a service. Inspect the actual match positions and capture groups, including named groups. A separate worker and a short execution deadline contain expensive backtracking patterns.
Matches run only when you select Test pattern. A disposable Web Worker is terminated after 750 ms so a backtracking pattern cannot lock the page.
Uses your browser’s JavaScript regex engine, not PCRE. Without g, only the first match is returned. y requires a match at the current position, starting at 0.
Inputs stay in this page’s memory. Exported matches may contain sensitive parts of your test text; review them before sharing.
Enter the pattern without surrounding slash delimiters, then enable the flags your application uses.
Paste a representative input or load an example. Select Test pattern; execution is never triggered while you type.
Review match offsets and captures, then copy or download the result as JSON.
Use \bORD-(\d{4})\b with g to find ORD-1042 and capture 1042 without accepting a two-digit order number.
Use ^TODO: (.+)$ with g and m to extract each TODO line. Without m, the anchors refer to the whole input.
An empty pattern can match between characters. With u enabled, the tester advances over a complete Unicode code point after an empty global match.
Positions count UTF-16 code units, the indexing convention used by JavaScript strings. An emoji outside the basic multilingual plane takes two units. A displayed start of 2 does not necessarily mean two visible characters came before the match.
The first 200 matches are retained. Match text is clipped to 1,000 units; original length is shown separately. The first 20 numbered and named capture groups are retained at 200 units each. A null capture means the optional group did not participate, while an empty string is a participating zero-length capture.
The tester uses the browser’s ECMAScript engine. It does not translate PCRE, .NET, or Python patterns. The 750 ms deadline includes worker startup; a timeout is a practical local limit, not a benchmark or a proof that a regex is safe on production data.
Without g, JavaScript returns the first match. Enable g to continue through the input. The y flag instead requires a match at the current position and does not search ahead.
No. It terminates this execution when the deadline expires. Runtime can change sharply with different input. Production systems still need their own input limits and safer pattern design.
This tool focuses on matching and capture inspection. It does not run arbitrary JavaScript replacement functions or evaluate expressions.