Regex Tester

Test JavaScript expressions, inspect captures and highlight exact matches.

About this tool

Enter a JavaScript regular expression without surrounding slashes, select flags and test your text. Live repeats after a short typing pause; it does not run on opening the tool.

Without g only the first match is returned. y starts at offset zero; together with g it continues without gaps. Empty matches advance one code unit, or one Unicode code point with u. Indices are zero-based UTF-16 positions; ranges [start, end) exclude the end. A marker shows empty matches. Uncaptured groups differ from empty captures; named captures are also shown.

Examples demonstrate extraction, not complete address, email, URL, HTML or calendar validation. IPv6 examples cover hexadecimal groups, without IPv4 suffixes or zone identifiers. Date examples check the shape only. CSS colors include alpha forms; UUID examples check hexadecimal shape only.

Matching uses your browser’s JavaScript engine in a cancellable worker. The 2-second deadline includes loading; expensive expressions can be stopped without a result. Limits: 4,096 pattern and 200,000 text UTF-16 units, 100 captures, 2 million captured units; first 1,000 matches and 100 table rows per page. A warning appears only when another match exists. Highlighting covers those retained matches.

Exact raw pattern, text, flags and Live are kept in local browser storage through the shared adapter. Match results, pages and the selected section are not saved; reloading never starts a search, including with Live selected. Legacy drafts and option settings are retained. Reset restores the example and switches Live off. Nothing is uploaded. Syntax and browser support follow ECMAScript RegExp; this is not a PCRE tester.