Write a pattern
Type it between the slashes, or paste a /pattern/flags literal. Turn flags on and off with the buttons.
Type a pattern and some text: every match lights up as you type, with its capture groups in a table.
Preview a replacement, read the pattern explained in plain words, or start from a ready-made pattern.
Matching…
Matches will be listed here.
Type it between the slashes, or paste a /pattern/flags literal. Turn flags on and off with the buttons.
Paste the text to search. Matches are highlighted as you type and listed with their groups.
Preview a replacement, extract the matches with a template, or read what each part of the pattern does.
Generate images, video and 3D models from your own code with WaveSpeed AI.
Create images from a prompt, or edit the ones you have.
Turn a still image or a prompt into a short video clip.
Turn a picture into a 3D model.
$1 in free credits for eligible new accounts. No card needed. Generators have separate account and credit requirements. The regex tester is free.
JavaScript (ECMAScript), run by your browser’s own engine, so results match what your code does in the same browser or in Node.js. Other flavors such as PCRE, Python or Java differ in places: possessive quantifiers, atomic groups and inline comments are not available in JavaScript.
No. The pattern and the text are matched in your browser and never sent anywhere.
Patterns such as (a+)+$ can take exponentially long on some text (catastrophic backtracking). Matching runs separately from the page and is stopped after 2 seconds, with a hint on how to fix the pattern, so the page never freezes.
Write $1, $2 … for numbered groups, $<name> for named ones, $& for the whole match and $$ for a dollar sign. The preview updates as you type.
g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match line breaks, u turns on Unicode mode, v adds Unicode sets, y matches only at the current position and d records group positions. Hover a flag button for its meaning.
Up to 10,000 matches are listed and highlighting covers the first 200,000 characters; replace, extract and the match count use the whole text. Texts up to 5 million characters are accepted.
Your last pattern, flags, text and replacement are kept in this browser and come back when you return.
Free, private and instant.