← Back to all tools

Browser-based Regex Tester

Regex Tester — Test, Debug, and Understand Regular Expressions

Test regular expressions in real time with match highlighting, group capture, and plain-English explanations.

Pattern

Test Text

Contact us at support@example.com or sales@company.org for more info.
Matches2 matches found

Match #1

Full match: "support@example.com"

Group 1: "support"

Group 2: "example.com"

Match #2

Full match: "sales@company.org"

Group 1: "sales"

Group 2: "company.org"

Pattern Explanation

  • \b: a word boundary
  • (...): capture group
  • \w: a word character (a-z, A-Z, 0-9, _)
  • +: one or more times
  • "@": literal character
  • (...): capture group
  • \w: a word character (a-z, A-Z, 0-9, _)
  • +: one or more times
  • \.: a literal dot
  • \w: a word character (a-z, A-Z, 0-9, _)
  • +: one or more times
  • \b: a word boundary

Common Patterns

What Is a Regular Expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. They're used for validation, search-and-replace operations, and parsing text in applications.

Regex patterns are supported in almost every programming language and text editor, making them an essential tool for developers. If you're working with JSON data, check out our JSON Formatter to clean and inspect your payloads.

Common Regex Patterns

PatternMatchesExample
^[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}$Email addressuser@example.com
^\d{3}-\d{3}-\d{4}$US phone number555-123-4567
^https?:\/\/.+URLhttps://example.com

How to Use This Regex Tester

  1. Enter your regex pattern in the pattern input field
  2. Set any flags you need (global, case-insensitive, multiline, dotAll)
  3. Paste or type your test text in the test text area
  4. Review the highlighted matches and captured groups

Frequently Asked Questions

Which regex flavor does this use?

JavaScript's native RegExp engine (ECMAScript), the same engine used in Node.js and browsers.

Is my test text uploaded anywhere?

No, everything runs locally in your browser using JavaScript's RegExp object.

Why doesn't my pattern match anything?

Check your flags (e.g. missing the g flag for global search) and escape special characters like . or ( if you mean them literally.

Can I test multiline text?

Yes, enable the m flag so ^ and $ match the start/end of each line.

Related Tools