Reach ada@example.com or grace.hopper@navy.mil before Friday.
Match 1·6–21
ada@example.com
Match 2·25–46
grace.hopper@navy.mil
See every match, capture group, and replacement update as you type.
Type the pattern only. Leave off the slashes some languages put around it.
Flags
A regular expression tester highlights every match in your sample while you edit the pattern. Backend engineers, quality assurance analysts, and support leads use it to confirm a check before that check lands in validation code.
Matches, groups, and replacements update in the browser on each keystroke. The sample stays on this machine, and you do not need an account.
Every match lights up in the sample while you type, so a missing escape shows up before the pattern reaches validation code. You see the span itself, not a single yes or no.
Numbered groups and named groups list the text they caught, with the start and end offsets in the sample. You can check year, month, and day without guessing which pair of parentheses held them.
Replacement tokens fill in from the groups, and the rewritten sample updates on the same keystroke. You can confirm the new shape before a migration script touches a single row.
Email, date, color, web address, and log lines each load a pattern you can edit until it fits your text. A blank box is still there when none of those samples is close.
The match runs locally in the browser, so a log line or a customer address never leaves the tab. You do not create an account to run it.
You can test a pattern in four moves. The preview follows the text, so the highlight is what you trust before you copy anything into a file.
Type the pattern body and leave the surrounding slashes off. Those slashes are how some languages write a pattern in source code, and here they would be searched for as ordinary characters. The highlight updates on the next keystroke, so you can fix an escape before you paste the pattern into a file.
Paste the text you actually need to check, such as a form value, a log line, or a paragraph from a ticket. Matches mark themselves in that text, and each one lists the groups it captured. A sample chip at the top loads a starter string if you want to explore before you bring your own.
Turn on g to find every match, i to ignore letter case, and m when a caret or dollar sign should apply to each line. Use s when a dot must cross a line break, and u when you need Unicode character classes. Leave a flag off and the preview shows what your language will do with that same setting.
Copy the match list when you need the captured text, or switch to Replace and copy the rewritten string. The download button saves that same text as a plain file. Drop the pattern into your validator, your log query, or your review comment once the highlight matches what you expected.
These ten tokens cover most patterns people bring to a regular expression tester. Each row is the idea, a tiny pattern, and the text that pattern is meant to catch.
A caret and a dollar sign pin a match to an edge instead of letting it float inside the text. Use them when a value must fill the whole field, not merely appear somewhere in it.
“^\d{4}$”
A class lists the characters allowed in one position, and a leading caret inside the brackets flips that list. A range such as A to Z stays shorter than writing each letter out.
“[A-Z]{3}”
A quantifier says how many times the previous token may repeat, from one optional mark to an open-ended star. Bound it with a minimum and a maximum when an open star would run too far.
“\d{2,4}”
A pipe chooses between branches, and the engine takes the first branch that works. Group the branches when the choice should not swallow the tokens sitting on either side.
“INFO|WARN|ERROR”
Parentheses remember the text they match so you can read it back as a numbered group. They also limit how far a quantifier or a pipe is allowed to apply.
“(\d{4})-(\d{2})”
A name on a group shows up in the match list and in a replacement, which is easier to read than a bare number. The name does not change what the group matches.
“(?<year>\d{4})”
A lookahead checks what comes next without including those characters in the match. Use it when a rule must see a digit that you do not want to consume.
“\d(?=px)”
A lookbehind checks what came before the match and, like lookahead, does not consume those characters. It helps when a currency symbol must be present but should stay out of the amount.
“(?<=\$)\d+”
Flags change the whole pattern: g finds every match, i ignores case, m moves the line anchors, and s lets a dot cross a newline. Set them with the toggles rather than typing them into the pattern body.
“error”
A backslash turns an operator into a literal character, or turns a letter into an operator such as a digit class. When a match looks too wide, the missing backslash is the first place to look.
“example\.com”
Each row is a pattern with its flags, a line of three dashes, then the test string. The hidden answer is the match list this tester produced, offsets and groups included, so predict it before you reveal it.
“/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g --- Reach ada@example.com or grace.hopper@navy.mil before Friday.”
“/(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/g --- Shipped 2026-09-22. The previous build was 2026-03-01.”
“/https?:\/\/[^\s]+/g --- Docs live at https://naviohq.com/developer.”
“/#(?:[0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})\b/gi --- Ink #141210, paper #F8F4EC, accent #C45.”
“/^(\d{2}:\d{2}:\d{2})\s+(INFO|WARN|ERROR)\s+(.*)$/gm --- 09:14:02 INFO server listening on 3000 09:14:11 WARN retry scheduled 09:15:40 ERROR connection reset”
“/^\d{4}$/ --- 2026”
“/(?<=\$)\d+/g --- The refund was $48 and the note said 48.”
“/colou?r/gi --- Color, colour and COLOR.”
“/\d+/ --- Order 12 of 40”
“/(\w+)@(\w+)\.com/g --- ada@example.com, bob@test.com”
People open a regular expression tester when a pattern is about to touch real data. These are the checks that usually show up in that hour.
Run the address pattern against real values from the signup form before the release branch is cut. You will see which addresses match and which ones the pattern quietly drops.
Point the date pattern at a changelog and confirm year, month, and day land in separate groups. That check takes a few seconds and saves a broken parse in the import script.
Match the timestamp, the level, and the message as three groups on a real log excerpt. You can see whether a warning and an error both match before the alert rule goes live.
Highlight every hex color in a token file so a three-digit form is not missed next to a six-digit one. Designers and front-end engineers can agree on the pattern before it is copied into the linter.
Switch to Replace and preview how numbered and named groups rewrite a column of values. You can confirm the new shape on a sample before a script touches the table.
Load a sample during a review and edit one token at a time so the other person sees the highlight move. That is faster than describing a quantifier in a comment thread.
You can write a pattern by hand from a single example instead of starting with a star. The plate on the side is the order that keeps the first draft small enough to trust.
Write the characters you must see, and escape any dot, plus, star, or parenthesis that should stay literal. A pattern that begins as plain text is easier to widen than one that starts with a star.
naviohq\.com
Replace one varying character with a class or a shorthand such as a digit class. Keep the class as small as the real data allows so you do not accept characters the field will never contain.
id-\d{4}
Put a minimum and a maximum on the token that repeats, because an open star will cross a delimiter you meant to stop at. A count also documents the rule for the next person who reads the pattern.
\d{4}-\d{2}-\d{2}
Wrap the part you need to keep, and leave the surrounding labels outside the parentheses. A named group pays off as soon as a replacement or a log parser has to mention that piece again.
WARN\s+(?<message>.*)
Pin the start and the end when a field should contain nothing except the pattern. Without those anchors, a long string can hide a valid fragment in the middle and still look like a pass.
^[^@]+@[^@]+\.[^@]+$
Add one string you expect to reject, not only the strings you expect to accept. A pattern that matches everything in a happy sample often fails the first messy ticket that reaches production.
not-an-email
Put one real value in the test string before you write any tokens. A concrete value keeps you from inventing a pattern for text you do not actually have in the ticket.
Type the words and symbols that never change, and escape the operators among them. Fixed text is the skeleton, and the classes you add later hang on that skeleton instead of replacing it.
Swap one varying spot at a time for a class or a limited count, then watch the highlight. If the highlight jumps past the end of the value, the count is too open.
Add parentheses only around the text a later step will use, and give that group a name if you will mention it again. Extra groups make the match list noisy and make a replacement harder to read.
Paste a near miss that should fail, such as a missing domain ending or a level your alert should ignore. If that near miss still highlights, tighten an anchor or a class before you trust the pattern.
Once the good value highlights and the near miss does not, copy the pattern into the code that will run it.
A flag or a quantifier changes the highlight more than a longer pattern does. Reach for these when a match looks plausible and still is not the text you wanted.
Without g, the tester stops after the first hit, which hides later failures in a long sample. Turn g on when you need every address, date, or error line in the text.
A caret matches only the start of the whole sample until you turn m on. With m, each log line can start a new match, which is what you want for line-oriented files.
A greedy star consumes as much as it can and then gives characters back, so it often swallows the next delimiter. A question mark after the star stops at the first delimiter instead.
A named group such as year stays readable in the match list and in a replacement. Use a name once a pattern has more than two captures and the number alone no longer tells you which text is which.
A group that is quantified and also contains a star or plus can lock the tab on a long string. The tester stops that case past 16 characters, so try the pattern on a short sample first.
Those characters are operators, so a domain written with a bare dot will match any character in that position. Put a backslash before the character when you mean the character itself.
Generations
Users
Free AI tools
Avg rating