Developer Utilities

Regex Tester & Cheat Sheet

Test regular expressions live with match highlighting, capture group analysis, and replacement preview. Includes an interactive cheat sheet and 10+ prebuilt examples. Everything runs locally in your browser.

//
g
3 matchesPattern: 46 chInput: 118 ch⬤ Intermediate

Live Match Highlighting

Contact us at hello@example.com or contact@nvrnexus.com for help. Billing: billing@nvrnexus.com — Response within 24h.
Match #1[14–31]

hello@example.com

Start: 14End: 31Len: 17
Match #2[35–55]

contact@nvrnexus.com

Start: 35End: 55Len: 20
Match #3[75–95]

billing@nvrnexus.com

Start: 75End: 95Len: 20

100% Client-Side Processing

Patterns evaluated in your browser JS engineTest strings never sent to any serverNo data storage or loggingNo analytics on your regex patterns

What Is Regex?

Regular expressions (regex or regexp) are sequences of characters that define search patterns. They are a fundamental tool in programming for string searching, data validation, text extraction, and find-and-replace operations. Every major language — JavaScript, Python, Java, PHP, Go, Ruby — has native regex support.

A regex pattern like \d3-\d4 matches a phone segment with 3 digits, a hyphen, and 4 digits. Patterns can range from simple literals to complex expressions with lookaheads, named groups, and Unicode properties.

How to test a regular expression

Step 1

Enter a pattern

Type only the pattern body. The surrounding slashes are shown by the interface and are not part of the input.

Step 2

Choose flags

Turn on global, case-insensitive, multiline, dotAll, Unicode, or sticky behavior as required.

Step 3

Inspect and replace

Review match indexes and groups, then test JavaScript replacement tokens before copying or exporting results.

Regex Accuracy and Performance Notes

This tester uses the JavaScript RegExp engine in your browser. Syntax and features can differ from PCRE, Python, Java, .NET, or RE2. Presets are practical examples, not a substitute for standards-aware parsing or business-rule validation. For example, the card-shape preset checks formatting only; it does not perform a Luhn check or confirm that a card exists.

Some patterns with nested or ambiguous repetition can cause excessive backtracking. Test unfamiliar patterns on small, non-sensitive samples before using them with large or untrusted input.

Regex Flags Reference

FlagNameEffect
gGlobalFind all matches
iIgnore CaseCase insensitive
mMultiline^ $ match line ends
sDot AllDot matches newline
uUnicodeFull Unicode support
yStickyMatch from lastIndex

Continue Your Developer Workflow

Clean and inspect structured data with the JSON Formatter & Validator, compare transformed output with the Text Compare & Diff Checker, prepare URL values with the URL Encoder & Decoder, or convert tabular test data using the CSV ↔ JSON Converter.

Technical References

Review the MDN JavaScript RegExp reference for practical syntax and browser guidance, or consult the ECMAScript regular-expression specification for normative engine behavior. External references open in a new tab.

Frequently Asked Questions