How to use this tool
- 1 Open Regex Tester & Helper, then enter, paste, or choose the content you want to process.
- 2 Adjust the available options and output format for your task.
- 3 Review the instant result, then copy or download the available output.
Test regular expressions with real-time highlighting and common syntax presets.
Test regular expressions with real-time highlighting and common syntax presets. Use it for everyday work, development, learning, or quick verification.
This tool runs in your browser. Before working with sensitive data, make sure you trust your browser and device environment.
This regex tester runs your pattern with the browser’s built-in JavaScript RegExp engine. Type a regular expression at the top, paste test text below, and every match is highlighted live, with a running match count. The Match Details list shows each match, its index range in the text (for example Index: 12-27) and the value of every capture group (Group 1, Group 2…), so you can see at a glance whether your parentheses capture what you think they capture.
Toggle the g flag to find all matches (without it, only the first match is returned), i to ignore case, and m for multiline mode, where ^ and $ match at the start and end of each line. If the pattern is invalid, such as an unbalanced parenthesis or a quantifier with nothing to repeat, the tool shows the browser’s syntax error message instead of silently returning nothing, and re-runs as soon as you fix it.
Five presets give you a starting point: email address, Taiwan mobile number (10 digits starting with 09), IPv4 address (each octet 0–255), Taiwan national ID format, and a strong-password check (at least 8 characters with uppercase, lowercase and a digit). One click loads the pattern, flags and sample text so you can adapt it. Note that the ID preset only checks the shape, one letter, then 1 or 2, then eight digits, and does not verify the checksum digit; the email pattern is a practical approximation, not the full RFC grammar.
Because it uses JavaScript syntax, it is ideal for front-end form validation, Node.js scripts and browser extensions. Most basics carry over to Python, PHP (PCRE), Java or SQL, but some advanced features such as possessive quantifiers, atomic groups or the \A and \Z anchors are engine-specific, so results can differ. All matching happens in your browser; your test text is never uploaded.
In JavaScript, \w means only [A-Za-z0-9_], \d means only 0–9, and \b uses \w to decide word boundaries. Letters such as é, ñ or any CJK character are not word characters. Match them explicitly, for example [\u4e00-\u9fff]+ for common Chinese characters or [A-Za-zÀ-ÿ]+ for Latin-1 letters.
Only the first match is found, so the counter shows at most 1. Turn g on to find every occurrence, for example to extract all email addresses. This mirrors JavaScript itself, where match() and replace() without g handle only the first match.
Usually, for the common parts: character classes, quantifiers, groups and lookaheads like (?=…) behave the same. Differences show up in delimiters (PHP needs /…/), flag syntax and advanced PCRE-only features. Confirm the logic here, then run it once in your target language.
No. This tool focuses on testing and inspecting matches: highlighting, counts, indexes and capture groups. For plain find-and-replace across a block of text, use the Text Cleaner tool on this site.
Browse this category: Dev Tools
Generate Lorem Ipsum dummy texts and mock API schema structures to export as JSON.
Decode and inspect JWT JSON structures (Header/Payload/Signature) and view expiration metadata.
Format, indent, and beautify SQL queries with case conversion for keywords.
Configure Cron schedule visually, parse expressions to readable text, and predict execution times.