Regex & Bulk Replace Tester | JavaScript-Compatible, See Matches

Your text is not sentJavaScript compatibleShow matches & capturesSave CSV or replacement

Enter a regex to check matches

Updates syntax errors, matches, captures, and replacement results as you type.

Processed locally

Search text

Matched locations

Match0 matches
Capture0 items
Processing time0ms

Match results will appear here.

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

  1. Enter search patternDo not include leading/trailing slashes in the regex field; enter only the pattern to search for.
  2. Choose flagsUse g for global search, i to ignore case, and m to apply ^ and $ to each line.
  3. Paste target textCheck the matched parts and count. For long text, lowering the match limit makes it easier to review.
  4. View capturesCheck that reusable parts like year, month, and day in dates are separated as intended.
  5. 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

FlagsMeaningExample
gSearch the entire text, not just the first matchReplace identical text in bulk
iCase-insensitive matching for lettersFind both Excel and excel
mApply ^ and $ to the start and end of each line instead of the entire textPrefix each line with a symbol
sDot . matches newlinesFind ranges spanning multiple lines
uTreat as Unicode code pointsHandle emoji and supplementary characters safely
yMatch only from the lastIndex positionPosition-fixed processing like lexical analysis

Common regex examples

PurposePatternNote
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})?\bDoes 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.

Related free tools