Enter a regex to check matches
Updates syntax errors, matches, captures, and replacement results as you type.
Enter a regular expression and the target text.
Search text
Matched locations
Display limit reached. Please narrow your criteria.
Match results will appear here.
$& is the whole match, $1–$99 are numbered capture groups, and $<name>refers to a named capture group.
How to read your regex
The explanation is auxiliary information that mechanically breaks down major symbols. It cannot fully infer complex lookahead, lookbehind, or nesting intent.
The regex and text are processed only in your browser.
What you can do with the Regex and Bulk Replacement Tester
Enter a JavaScript-compatible regular expression and check matches in the text in real time. View a list of matched text, start position, line and column, numbered and named captures, and check the full text after replacement before running.
The target text, regular expression, and replacement string are processed in your browser and not sent to external servers or AI. When handling customer names, internal documents, or logs, manage copies and saves yourself.
Real-time matching
When you stop typing, the match count and highlighting update, helping you quickly spot incorrect ranges.
Capture check
Displays numbered groups like $1 and named groups that go into groups for each match.
Bulk replacement preview
Creates the full text after replacement without changing the original, and you can copy or save it as UTF-8 text.
Plain-English regex explanation
Explains major symbols such as character classes, quantifiers, anchors, and groups according to your input.
Steps to verify regex and perform bulk replacement
- Enter search patternDo not include leading/trailing slashes in the regex field; enter only the pattern to search for.
- Choose flagsUse g for global search, i to ignore case, and m to apply ^ and $ to each line.
- Paste target textCheck the matched parts and count. For long text, lowering the match limit makes it easier to review.
- View capturesCheck that reusable parts like year, month, and day in dates are separated as intended.
- Preview replacementReview the full text visually, and if needed, use a text comparison tool to check differences from the original before using.
Main flags for JavaScript regex
| Flags | Meaning | Example |
|---|---|---|
| g | Search the entire text, not just the first match | Replace identical text in bulk |
| i | Case-insensitive matching for letters | Find both Excel and excel |
| m | Apply ^ and $ to the start and end of each line instead of the entire text | Prefix each line with a symbol |
| s | Dot . matches newlines | Find ranges spanning multiple lines |
| u | Treat as Unicode code points | Handle emoji and supplementary characters safely |
| y | Match only from the lastIndex position | Position-fixed processing like lexical analysis |
Common regex examples
| Purpose | Pattern | Note |
|---|---|---|
| Blank line | ^\s*$ (gm) | Also matches lines containing only whitespace |
| Repeated whitespace | \s+ | Includes spaces, tabs, and Unicode whitespace |
| ISO-style date | \d{4}-\d{2}-\d{2} | Calendar validity still needs a separate check |
| US ZIP code | \b\d{5}(?:-\d{4})?\b | Does not verify whether the ZIP code exists |
| Numbered-list prefix | ^\s*\d+[.)]\s* (gm) | May also match non-list numbers |
How to use captures in the replacement string
Parts enclosed in parentheses can be reused in the replacement string as $1, $2 from left to right. For example,(\d{4})-(\d{2})-(\d{2}) in$1-$2-$3 Replacing with , 2026-08-30 becomes August 30, 2026.
(?<year>\d{4}) Named captures like$<year> You can reference it with . If you need to keep text before or after the replacement target, avoid widening the target range too much and reassemble only the necessary parts with captures.
Checkpoints when regex is slow or doesn’t match
Regexes with multiple nested quantifiers or ambiguous.* Conditions with many can cause processing time to spike on long text. Make the starting character or character class more specific and narrow the range to the minimum needed. This tool limits the number of displayed matches but cannot fully limit the execution time of the regex itself.
If there is no match, check full-width vs half-width characters, line breaks, invisible whitespace, and flags. The regex is JavaScript-compatible. PCRE- or Python-specific features and replacement syntax may not work as-is.
Process without sending input text
Matching, capture extraction, highlighting, replacement, syntax explanation, and CSV/text creation run in your browser. Input is not sent to WiseChecker servers, external APIs, or AI. Reloading the page clears input and results.
Frequently asked questions about regex testers
Do I need a / in the regex field?
Not needed. Enter only the search pattern; specify g or i in the flags field or checkboxes on the right.
Is this the same as Excel regex?
This is the JavaScript RegExp specification. Supported syntax varies by product or language.
Does replacing also change the original text?
No change. The replacement preview will show a different result.
What is included in the match results CSV?
Saves match number, text, start position, line, column, and each capture as UTF-8 CSV.
Is confidential text sent?
It is not sent. It is processed in your browser.
Can you guarantee regex safety?
Not possible. Test in your target environment and check processing time and unexpected matches for long inputs.