Skip to main content
HomeToolsRegex Tester
DEVELOPER TOOL

Regex Tester

🔍 Test, debug and build regular expressions instantly — with live match highlighting, capture groups, replace, cheat sheet & 12+ common patterns.

✅ 100% Free⚡ Live Highlighting📋 Regex Cheat Sheet🔄 Find & Replace
All JS Regex Flags
Named Capture Groups
Built-in Reference

Common Patterns — Click to Load

Regular Expression

//g
Flags:

Test Text

0 chars · 1 lines

🔧 How It Works

Test and debug regular expressions instantly with live match highlighting

1

Enter Your Pattern

Type or paste your regular expression pattern and select flags like global, case-insensitive or multiline

2

Paste Test Text

Enter the text you want to test your regex against — paste from any source or use a common pattern template

3

See Highlighted Matches

Instantly see all matches highlighted in your text with match count, groups, indexes and replace support

Frequently Asked Questions

Everything you need to know about regex testing and this tool

Do I need to sign up or log in to use this tool?

No. All QuickTextTools are completely free to use online with no login, signup, or account required.

What is a regular expression (regex)?

A regular expression is a sequence of characters that defines a search pattern. Regex is used to find, match, extract, and replace text based on patterns. It is supported in almost every programming language including JavaScript, Python, Java, PHP and more.

What regex flags are supported?

This tool supports all standard JavaScript regex flags: g (global — find all matches), i (case insensitive), m (multiline — ^ and $ match line boundaries), s (dotAll — dot matches newline), u (Unicode mode), and y (sticky matching).

How does the match highlighting work?

All regex matches are highlighted directly in your test text with color-coded marks. Each match shows its position (start and end index), the matched string, and any capture groups found.

Can I use this as a regex replace tool?

Yes. Switch to the Replace tab, enter your replacement string, and click Replace. You can use capture group references like $1 and $2 in your replacement string. Named groups can be referenced with $<name>.

What are the common regex patterns provided?

The tool includes ready-to-use regex patterns for emails, URLs, phone numbers, IP addresses, dates, hex colors, HTML tags, JWT tokens, credit cards, slugs, whitespace detection, and repeated words. Click any pattern to load it instantly.

Is there a regex cheat sheet?

Yes. Click the Cheat Sheet tab to see a full reference covering character classes, anchors, quantifiers, groups, lookaheads, lookbehinds, and alternation. Click any pattern in the cheat sheet to insert it into your regex.

What is the maximum number of matches found?

The tool caps matches at 1000 to ensure performance. For most real-world use cases this limit is never reached. The execution time in milliseconds is also shown for each test.