Free · no signup · runs in your browser
Test regular expressions in real time.
Write a pattern, paste your test string and see every match highlighted as you type. Capture groups, replace mode and a quick reference included.
How it works
01PatternWrite your regex pattern
02TestPaste your test string
03MatchSee highlights instantly
04ReplaceOptional find & replace
What it shows
Uses your browser's JavaScript regex engine.- Every match highlighted in place
- Index and capture groups for each match
- Replace with $1, $2 group references
- 7 presets: email, URL, phone and more
Pattern
//g
Flags
Replace mode
Turn on to find and replace across the test string.
.Any character\dDigit [0-9]\wWord character [a-zA-Z0-9_]\sWhitespace^Start of string$End of string*0 or more+1 or more?0 or 1{n}Exactly n{n,m}Between n and m[abc]Character class[^abc]Negated class(...)Capture group(?:...)Non-capturing group\bWord boundary|AlternationJavaScript regex syntax, as your browser runs it.
A regular expression (regex) is a sequence of characters that defines a search pattern. It is used to match, find, and manipulate text. For example, the pattern \d{3}-\d{4} matches phone number fragments like 555-1234. Regular expressions are supported in virtually every programming language and many text editors.
Flags modify how the regex engine interprets your pattern. The global flag (g) finds all matches instead of stopping at the first. Case insensitive (i) ignores letter casing. Multiline (m) makes ^ and $ match the start and end of each line rather than the entire string. DotAll (s) makes the dot (.) match newline characters. Unicode (u) enables full Unicode matching for surrogate pairs and properties.
Capture groups are created by wrapping part of your pattern in parentheses, e.g. (\d{4})-(\d{2})-(\d{2}). Each group captures the matched text so you can reference it later. Groups are numbered left to right starting at 1. In replace mode, you can reference captured groups with $1, $2, etc. Non-capturing groups (?:...) group without capturing, which is useful when you need grouping for alternation or quantifiers but do not need the matched text.
By default, quantifiers like *, +, and {n,m} are greedy — they match as much text as possible. Adding a ? after the quantifier makes it lazy, matching as little text as possible. For example, given the string <b>hello</b>, the greedy pattern <.*> matches the entire string, while the lazy pattern <.*?> matches only <b> and </b> separately. Use lazy matching when you want the shortest possible match.
Select the Email preset from the dropdown above, or enter a pattern like [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} in the pattern field. Then paste sample email addresses in the test string area to see which ones match. Keep in mind that fully RFC-compliant email validation is extremely complex — for production use, combine a reasonable regex with server-side validation such as sending a confirmation email.

Next step
Go beyond testing.
Schedule posts, track analytics and grow your LinkedIn audience with AI-powered tools.
Book a free strategy callSchedule with PostWyseOr read the LinkedIn growth playbook