Regex Tester & Replacer
Test JavaScript regular expressions against any string with live match highlighting, capture groups (named and numbered), and optional replace.
Runs 100% in your browser — nothing is uploaded.
//gm
Matches3
Contact ada@example.com or grace@nasa.gov to volunteer. Alan.turing@bletchley.uk maintains the crypto machines.
Match details
- #1 @ 8: ada@example.comGroups: $1=ada$2=example.com
- #2 @ 27: grace@nasa.govGroups: $1=grace$2=nasa.gov
- #3 @ 61: turing@bletchley.ukGroups: $1=turing$2=bletchley.uk
Frequently asked
Which regex flavor is this?
JavaScript / ECMAScript regex (via the browser's native RegExp). Very close to Perl-compatible (PCRE) but with a few differences around lookbehinds, unicode, and named groups.
Why is the "g" flag always on?
Without global mode you'd only ever see one match. The tool forces "g" so all matches are shown; other flags are yours to toggle.
What does "sticky" do?
The "y" flag forces the match to start exactly at lastIndex. Rarely useful interactively — mainly for building high-performance tokenizers.
Related tools
- JSON FormatterFormat, validate, and minify JSON in your browser. See parse errors with line/co
- SQL FormatterFormat and beautify SQL for 10 dialects including PostgreSQL, MySQL, SQLite, Big
- Text DiffCompare two blocks of text line by line and see exactly what changed. Runs entir
- Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal. Supports huge n
- Cron BuilderPick a preset or enter your own fields to build a cron expression. Includes a pl
- CSS Beautifier & MinifierBeautify minified CSS with proper indentation, or minify pretty CSS to a single