How do I match a literal dot in regex?
Escape it: \. matches a literal period. Inside [...] many specials are literal: [.*+] matches dot, star, or plus.
Test regular expressions with live match highlighting, groups, flags, and replace—runs locally, no upload.
Regex checker & validator — uses the same JavaScript RegExp engine as Node and browsers. Patterns and test text never leave your device.
Engine
JavaScript RegExp—same as Node.js and browsers
Global /g
Find all matches; required for replace-all
Privacy
Worker runs locally—patterns never uploaded
/pattern/g$& = full match, $1 $2 = capture groups. Runs entirely in your browser.
Enter a pattern to see token explanations.
No saved regexes. Saves stay in your browser (localStorage).
See matches update instantly as you type.
Runs 100% locally — no data leaves your browser.
Enter a regex pattern above to see matches here.
A regex tester runs a JavaScript regular expression against sample text and shows matches, capture groups, flags, and replace output—entirely in your browser with no upload.
A regular expression (regex) is a pattern language for searching, validating, and transforming text. Developers use regex in logs, APIs, form validation, and editors—but small syntax errors cause silent failures. A regex tester lets you paste a pattern and test string, toggle flags (global, multiline, case-insensitive), and see highlighted matches with group details before shipping code.
This tool uses the same JavaScript RegExp engine as Node.js and browsers, so results match runtime behavior for most web apps. It is not PCRE/Python syntax—possessive quantifiers and some escape rules differ. Patterns and sample text stay on your device; nothing is sent to EverydayTools servers.
Pair with JSON Validator when extracting fields from payloads, or Text Diff when comparing pattern output across versions.
Concise answers for common searches — definitions, steps, and comparisons.
Escape it: \. matches a literal period. Inside [...] many specials are literal: [.*+] matches dot, star, or plus.
Greedy * + ? {n,m} take as much as possible. Lazy *? +? ?? {n,m}? take as little—useful between delimiters like <tag>...</tag>.
Yes. All matching runs in your browser; patterns and test text are not uploaded to servers.
Patterns compile with new RegExp(pattern, flags) in an isolated Web Worker. Matches are collected with exec() in a loop when /g is set, with caps on match count and execution time to reduce ReDoS risk.
Formula
Match: RegExp.exec(testString) in loop
Replace: testString.replace(regex, replacement)Paste your RegExp pattern and sample text—or load Email, URL, or other presets from the library.
Enable global (g) for all matches, multiline (m) for line anchors, dotAll (s) so . matches newlines, and unicode (u) when needed.
Highlighted text shows each match; open match details for indices, numbered groups, and named groups.
Optional replacement string previews substituted output. Copy a share link with pattern and flags encoded in the URL.
Input
Pattern \d+ on text "Order 42 costs $19.99"Output
Matches 42 and 19, 99With /g the engine finds every digit sequence; without /g only 42 matches.
Input
Common email pattern vs alice+tag@sub.example.co.ukOutput
Match or no match with highlighted spanValidates practical format checks—not RFC-complete deliverability testing.
Common real-world scenarios where this tool saves time.
Load common patterns, then test edge cases (subdomains, plus addressing, ports) before form validation code.
Extract timestamps, IDs, or log levels from sample lines—locally, without uploading production logs.
Preview replace output with $1/$2 or named $<group> before running sed or editor batch replace.
Use the pattern explainer to see what each token means while building complex lookaheads and character classes.
Step-by-step chains that connect related tools for common tasks.
When to use each developer tool on EverydayTools.
| Tool | Best for |
|---|---|
| Regex Tester | Pattern match, groups, replace preview on arbitrary text |
| JSON Validator | Syntax-valid JSON before parsing or formatting |
| JSON Formatter | Beautify and minify JSON payloads |
| Text Diff | Compare two text or code versions line by line |
Use \. for a literal dot. Outside a character class these operators are metacharacters.
No possessive ++ or atomic groups; use JavaScript-compatible patterns or test in the target language.
Advertisement
JavaScript RegExp (ECMAScript) in your browser—the same engine as Node.js and front-end apps. PCRE/Python differ on possessive quantifiers, (?P<name>), and some escapes—re-test in your target runtime for production patterns.
With /g the engine finds every match and advances through the string. Without /g only the first match is returned—replace also affects only the first occurrence unless /g is set.
g = all matches; i = case-insensitive; m = ^ and $ per line; s = dot matches newlines; u = Unicode; d = match indices; v = unicode sets; y = sticky. Combine flags: /pattern/gim.
Enter pattern and test text—matches highlight as you type. Turn on /g for all occurrences. Add a replacement to preview substituted text. Syntax errors show immediately with a clear message.
Nested quantifiers like (a+)+ can make the engine try exponentially many paths on non-matching input, freezing the tab. Avoid nested quantifiers on the same class; test long non-matching strings; this tool times out long runs in a worker.
No. Matching runs locally in a browser worker. Your patterns and test strings never leave your device.
Patterns and test strings are evaluated in a browser Web Worker. Nothing is uploaded to EverydayTools—safe for logs containing tokens or personal data.
Uses the native JavaScript RegExp engine—the same semantics as Node.js and modern browsers for the flags you select.
For debugging and learning patterns—not a substitute for security review or production ReDoS audits on user-supplied regex.
Part of Developer Tools
More free tools for the same workflow.
Build and parse five-field cron expressions with human-readable descriptions and next-run previews.
Paste notes, articles, or chat exports and get deduplicated website names (example.com). Tidy whitespace, copy or .txt download. No upload—runs in your browser.
Compare two plain-text inputs line by line and highlight changes. Local diff for logs and copy—not JSON structure.
Advertisement
Reviewed by EverydayTools Editorial Team on 2026-05-20.