Regex tester, explained in plain English
Type a pattern and some text. Matches light up as you type, every part of the pattern is explained in plain words, and you can copy it as JavaScript, Python or Zod.
More free tools
How it works
- Type a pattern in the top box, or pick a common one like Email or Date. Paste your own text below it, and every match lights up as you type, with each group in its own colour.
- Read “What this pattern means”: every piece of the pattern explained in plain English, in order, so you can see why something matches or doesn’t.
- Copy it as JavaScript, Python or a Zod
.regex(). Found a pattern in your code you don’t understand? Paste it in and use “Copy prompt for your AI agent” to have Claude Code, Cursor or Codex check it against your project.
Questions
What is a regex?
A regular expression (regex) is a short pattern that describes text, like “an @ with letters on both sides”. Code uses it to check form fields, find things in text, or clean data. This tool shows what a pattern matches and explains it in plain words.
Which regex flavour is this?
JavaScript, the same engine your browser and Node.js use. Python is very close: “Copy as Python” converts named groups and the few other differences for you, and adds a note when something needs the regex package.
What do the flags do?
g finds every match instead of the first. i ignores capital letters. m makes ^ and $ work per line. s lets . match line breaks. u turns on Unicode features like \p{L}. y only matches exactly where the last match ended.
Why does my pattern match part of a word I didn’t want?
A regex finds the pattern anywhere unless you pin it. Add ^ at the start and $ at the end to make the whole value match, or \b to match whole words only.
What does “Too slow” mean?
Some patterns, often a repeat inside a repeat like (a+)+, take forever on certain text. That can freeze a page or a server. The tester stops after a second and a half and tells you, so you can rewrite it before it ships.
Is my text uploaded?
No. Everything runs in your browser. The share link only contains your pattern, flags and test text if you copy it.