tools

Regex Tester

Test JavaScript regular expressions with live highlighting, capture groups and replace preview.

[loading tool…]

How it works

Patterns run with your browser’s JavaScript engine (ECMAScript flavor), in a Web Worker. If a pattern takes more than 500 ms (catastrophic backtracking, as with (a+)+$ on a long string), the worker is stopped and the page stays responsive.

Flags

Flag Effect
g find all matches, not just the first
i case-insensitive
m ^ and $ match at line breaks
s . also matches newlines
u Unicode mode: \u{…}, \p{…} property escapes, stricter syntax
y sticky: match only at lastIndex

Replacement syntax

$1…$99 numbered group · $<name> named group · $& whole match · $` text before · $' text after · $$ a literal $.

Differences from other flavors

No possessive quantifiers or atomic groups (PCRE), no (?i) inline flags in most engines, and lookbehind must be fixed or bounded in some older browsers. Test in the flavor your code actually uses.

References

esc
All tools
ADC / DAC Resolution Calculator[embedded]
Base64 Encoder / Decoder[dev]
Battery Runtime Calculator[hardware]
Chmod Calculator[dev]
CRC Calculator[embedded]
Cron Expression Builder[dev]
CSV ⇄ JSON Converter[dev]
Duty-Cycle Battery Life[embedded]
Generator Wattage Calculator[hardware]
Hash Generator[dev]
HTML Entity Encoder[dev]
JSON Formatter & Validator[dev]
JSONPath Tester[dev]
JWT Decoder[dev]
LED Resistor Calculator[embedded]
LLM Memory / VRAM Estimator[ai]
Lorem Ipsum Generator[text]
Markdown Preview[text]
Markdown Table Generator[text]
Number & Float Inspector[embedded]
Number to Words[text]
Ohm's Law Calculator[embedded]
Password Generator[dev]
Quantization Size Calculator[ai]
RC / LC Filter Calculator[embedded]
Regex Tester[dev]
Register / Bitfield Viewer[embedded]
Resistor Color Code[embedded]
Roman Numeral Converter[text]
Solar Battery Bank Sizing[hardware]
Solar Panel Output[hardware]
SQL Formatter[dev]
Subnet / CIDR Calculator[dev]
Tensor Shape Calculator[ai]
Timer / PWM Calculator[embedded]
UART Baud Rate Error[embedded]
Unix Timestamp Converter[dev]
UPS Runtime Calculator[hardware]
URL Encoder & Parser[dev]
UUID Generator & Inspector[dev]
Voltage Divider Calculator[embedded]
Voltage Drop Calculator[hardware]
Wire Size Calculator[hardware]
XML Formatter[dev]
YAML Validator & Converter[dev]
Commands
Toggle theme (auto → light → dark)
Copy link to this page
Go to all tools
Lire en français
↑↓ move↵ open⌘↵ new tab