Enter pattern without slashes
g: global · i: ignore case · m: multiline · s: dotAll · u: unicode · y: sticky
Test regular expressions against text online, free. A regex tester lets you write a regular expression and instantly see what it matches in sample text. This tool evaluates your pattern with the browser's native JavaScript regex engine, highlighting every match and capture group live as you type — entirely in your browser.
Matches and capture groups update live against your sample text using the real JavaScript regex engine, so what you test is exactly what your JS/TS code will do. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.
Every match in your sample text is highlighted as you edit the pattern, so you see results instantly.
Use flags like g (global), i (ignore case), and m (multiline), and inspect captured groups from your pattern.
Patterns run on the browser's native JavaScript regex engine, so behaviour matches your front-end and Node.js code exactly.
Your pattern and test text stay in the browser and are never uploaded.
It uses the JavaScript (ECMAScript) regular-expression engine built into your browser. That's ideal for testing patterns you'll use in JS/TS or Node, but syntax can differ slightly from PCRE, Python's re, or Java's regex.
g (global) finds all matches instead of stopping at the first; i (ignore case) makes the match case-insensitive; m (multiline) makes ^ and $ match at line breaks. You can combine them as needed.
Parentheses ( ) create a capture group that extracts part of a match. Name them with (?<name>...) for readability. The tester shows what each group captured so you can build extraction patterns.
Usually a greedy quantifier. * and + match as much as possible; add ? (e.g. .*?) to make them lazy, or use a more specific character class instead of . to limit the match.
No. Everything runs in your browser; your regex and sample text are never sent to a server.
We use cookies for analytics and personalized ads to help keep these tools free. Until you accept, ads stay non-personalized and analytics cookies are off. See our Privacy Policy.