Regex Tester

Regex Tester

/ / gi
Common patterns:
0 matches

No matches yet - enter a pattern and some test text above.

0 matches
LineMatchesMatched text

No matches found across any line.

What Is a Regular Expression?

A regular expression (regex) is a compact pattern language for matching, searching, and manipulating text. Instead of searching for one exact string, a regex describes a shape of text - "a sequence of digits", "an email-like string", "anything between two quotes" - and the engine finds every piece of text that fits that shape.

Regexes are used everywhere in software: form validation, search-and-replace in editors, log parsing, data scraping, and input sanitization. This tool runs JavaScript's built-in RegExp engine directly in your browser, so you can build and debug a pattern against real sample text before dropping it into your code.

Common Regex Syntax Reference

TokenMeaning
\dAny digit (0-9)
\wAny word character (letters, digits, underscore)
\sAny whitespace character (space, tab, newline)
.Any character except a newline (unless the s flag is set)
+One or more of the preceding token
*Zero or more of the preceding token
?Zero or one of the preceding token (optional)
{n,m}Between n and m repetitions of the preceding token
^Start of the string (or line, with the m flag)
$End of the string (or line, with the m flag)
[abc]Any one character from the set a, b, or c
(...)A capturing group
(?<name>...)A named capturing group
\bA word boundary

Bulk Mode: Matching Across Thousands of Lines

Testing one line at a time doesn't scale when you're cleaning up a 10,000-line log file, a list of scraped URLs, or an exported spreadsheet column. Turn on Bulk mode above the pattern field to switch the preview into a per-line results table: each line that matched, how many times it matched, and the matched text - instead of one long highlighted wall of text that becomes unreadable past a few hundred lines.

Bulk mode also builds an Extracted Matches box you can copy in one click - capture group 1 when your pattern has one (so you get just the useful part, like the domain out of a URL or the error code out of a log line), or the full match otherwise, one per line. Everything still runs as a single pass of your browser's native regex engine over the whole text - large inputs stay fast because the per-line grouping is computed from the matches your browser already found, not by re-running the pattern once per line.

Why Use This Regex Tester

Instant FeedbackMatches highlight live as you type your pattern, flags, or test text - no submit button needed.
Full Match DetailsSee every match's index, matched text, and numbered or named capture groups at a glance.
Clear Error MessagesInvalid patterns show a friendly, specific error instead of silently failing.
100% PrivateYour pattern and text never leave your browser - nothing is uploaded or logged.
Bulk Mode for Real DatasetsPaste thousands of lines - logs, scraped URLs, exported lists - and see a per-line match breakdown plus a ready-to-copy extraction of every match.

Frequently Asked Questions

Does this tool send my text anywhere?

No, everything runs in your browser. Your pattern and test text are never uploaded or sent to a server.

What regex flavor does this use?

JavaScript's native RegExp engine, the same engine used in browsers and Node.js, so patterns behave exactly as they would in your own code.

Can I use named capture groups?

Yes. Patterns like (?<name>...) are fully supported and each named group's value is listed separately alongside the numbered groups for every match.

How does Bulk mode handle thousands of lines?

Bulk mode runs the pattern once across the whole text (same as normal mode), then groups the results by line using a single pass over the text - it never re-runs the regex once per line, so it stays fast even on large logs or URL lists. The results table renders the first 500 matching lines for performance; the summary count and the full extracted-matches list still reflect everything, not just what's shown.