🧪 TEXT
Regex Tester & Debugger
Test JavaScript regex live with highlighting, plain-language explanations, replace preview, and community patterns.
Your files are processed directly on your device and are not uploaded to our servers.
Test text — 1 match
Matches
- #1
hello@example.comat index 8
What does this pattern mean?
- [\w.+-]
- Character class: matches one of these characters
- +
- One or more of the previous
- @
- Literal "@"
- [\w-]
- Character class: matches one of these characters
- +
- One or more of the previous
- \.
- Literal "." (escaped)
- [\w.]
- Character class: matches one of these characters
- +
- One or more of the previous
Replace
Community patterns (12)
Email address
/gi[\w.+-]+@[\w-]+\.[\w.]+Practical email matcher for forms and pasted text. Not fully RFC-compliant by design.
formvalidationURL (http/https)
/gihttps?://[^\s/$.?#].[^\s]*Finds http and https links inside paragraphs.
linkscrapeIPv4 address
/g\b(?:\d{1,3}\.){3}\d{1,3}\bMatches dotted IPv4 addresses. Pair with a range check for strict validation.
networklogDate YYYY-MM-DD
/g\b\d{4}-\d{2}-\d{2}\bISO-style dates. Add month/day range checks for strict validation.
datevalidationTime HH:MM (24h)
/g\b([01]\d|2[0-3]):[0-5]\d\bStrict 24-hour clock times with capture group for the hour.
datevalidationInternational phone
/g\+?[0-9][0-9 .()-]{6,}[0-9]Lenient phone finder for pasted contact blocks. Normalize before dialing.
contactformUUID
/gi\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\bMatches UUID v1-v5 strings in logs and API payloads.
idlogHex color
/g#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\bFinds 3, 6, and 8-digit hex colors in CSS.
cssdesignURL slug
/^[a-z0-9]+(?:-[a-z0-9]+)*$Strict full-string slug check: lowercase, digits, single dashes.
validationseoHTML tag
/g</?[a-zA-Z][^>]*>Rough tag finder for quick audits. Use a parser for real HTML work.
htmlscrapeExtra whitespace
/g[ \t]{2,}Finds double spaces and stray tabs. Replace with a single space.
cleanuptextHashtag
/gu#[\p{L}\p{N}_]+Unicode-aware hashtag matcher for social text.
socialunicode
How to use
- Type your pattern and toggle flags — matches highlight live.
- Read the token-by-token explanation to debug each symbol.
- Try a replacement, then grab a community pattern for common jobs.
FAQ
- Is my pattern or test text uploaded anywhere?
- No. Matching, replacement, and explanations run entirely in your browser with the built-in RegExp engine. Nothing ever leaves your device.
- Which regex flavor is this?
- JavaScript (ECMAScript) regex — the same engine browsers use. Lookbehind and named groups work in all modern browsers; \p{…} Unicode properties need the u flag.
- Why does my pattern show an error?
- The error message comes straight from the JavaScript engine — unclosed brackets, stray backslashes, or bad quantifiers like *+ are the usual causes. Fix the highlighted syntax and testing resumes instantly.
- What do $1 and $& mean in the replacement?
- $1, $2… insert capture groups, $& inserts the whole match, $$ inserts a literal dollar sign. Use the preview to verify before copying.
- Are community patterns safe to use?
- They are starting points for common jobs (emails, URLs, dates). Strict validation always needs extra checks — e.g. the IPv4 pattern matches 999.1.1.1, so pair it with a range check.