• Pricing
  • Blog
Sign InGet Started
Free Tool

Regex Tester (2026)

Test regular expressions with live highlighting, capture groups, and match indices. Toggles g/i/m/s/u flags. Uses native JavaScript RegExp — same engine as your code.

//gi
Matches (2)
Email me at hello@specway.com or support@example.org.
Not an email: alice@.com or @broken.io.
  1. 1. hello@specway.com @ 12
    groups: [1] hello, [2] specway.com
  2. 2. support@example.org @ 33
    groups: [1] support, [2] example.org

How the tester works

The pattern is compiled with new RegExp(pattern, flags) — the same engine your JavaScript code uses. Matches are walked with .exec() in a global loop and shown live as you type. The tester capped at 1000 matches to prevent runaway patterns from freezing the page.

Patterns developers write all the time

  • Email: \b[\w.+-]+@[\w-]+\.[\w.-]+\b
  • URL: https?://[\w./?=&%~+:#-]+
  • UUID v4: [0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}
  • ISO date: \d{4}-\d{2}-\d{2}
  • Hex color: #[0-9a-fA-F]{3,8}

When NOT to use regex

Parsing HTML, JSON, or any nested structure. Regex is a flat-text engine — it can't count balanced brackets or distinguish "real" tags from text in comments. Use a real parser (DOMParser, JSON.parse, dedicated lib) for anything with structure. Regex is for flat patterns: emails, IDs, log lines, prefix extraction.

Ship API docs that stay this clean

Specway turns your OpenAPI spec into a branded developer portal — auto-synced, searchable, with built-in playground and code samples in every language. Free tier available.

Related tools

JSON Formatter
Pretty-print JSON output.
cURL to Code
Convert curl commands to JS/Python/Go.
JWT Decoder
Decode JWT tokens.
JSON Validator
Pinpoint JSON syntax errors.

Frequently asked questions

Beautiful API documentation that developers love.

Features

  • AI-Generated Docs
  • Interactive Playground
  • Auto-Sync
  • AI Chatbot
  • Breaking Changes
  • Code Samples
  • Custom Branding
  • Analytics

Compare

  • vs ReadMe
  • vs Swagger UI
  • vs Mintlify
  • vs Postman
  • vs Scalar

Ecosystem

  • Workflows
  • Forms
  • Marketplace
  • Integrations
  • MCP Servers
  • Digital Rooms
  • Product OS

Free Tools

  • JSON Formatter
  • JSON Validator
  • JWT Decoder
  • OpenAPI Validator
  • cURL → Code
  • YAML ↔ JSON
  • All free tools →

Resources

  • Free Developer Tools
  • Blog
  • Guides
  • API Glossary
  • Help Center
  • Support

© 2026 Modlific. All rights reserved.

Privacy PolicyTerms of Service
  • Pricing
  • Blog
Sign InGet Started
Free Tool

Regex Tester (2026)

Test regular expressions with live highlighting, capture groups, and match indices. Toggles g/i/m/s/u flags. Uses native JavaScript RegExp — same engine as your code.

//gi
Matches (2)
Email me at hello@specway.com or support@example.org.
Not an email: alice@.com or @broken.io.
  1. 1. hello@specway.com @ 12
    groups: [1] hello, [2] specway.com
  2. 2. support@example.org @ 33
    groups: [1] support, [2] example.org

How the tester works

The pattern is compiled with new RegExp(pattern, flags) — the same engine your JavaScript code uses. Matches are walked with .exec() in a global loop and shown live as you type. The tester capped at 1000 matches to prevent runaway patterns from freezing the page.

Patterns developers write all the time

  • Email: \b[\w.+-]+@[\w-]+\.[\w.-]+\b
  • URL: https?://[\w./?=&%~+:#-]+
  • UUID v4: [0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}
  • ISO date: \d{4}-\d{2}-\d{2}
  • Hex color: #[0-9a-fA-F]{3,8}

When NOT to use regex

Parsing HTML, JSON, or any nested structure. Regex is a flat-text engine — it can't count balanced brackets or distinguish "real" tags from text in comments. Use a real parser (DOMParser, JSON.parse, dedicated lib) for anything with structure. Regex is for flat patterns: emails, IDs, log lines, prefix extraction.

Ship API docs that stay this clean

Specway turns your OpenAPI spec into a branded developer portal — auto-synced, searchable, with built-in playground and code samples in every language. Free tier available.

Related tools

JSON Formatter
Pretty-print JSON output.
cURL to Code
Convert curl commands to JS/Python/Go.
JWT Decoder
Decode JWT tokens.
JSON Validator
Pinpoint JSON syntax errors.

Frequently asked questions

Beautiful API documentation that developers love.

Features

  • AI-Generated Docs
  • Interactive Playground
  • Auto-Sync
  • AI Chatbot
  • Breaking Changes
  • Code Samples
  • Custom Branding
  • Analytics

Compare

  • vs ReadMe
  • vs Swagger UI
  • vs Mintlify
  • vs Postman
  • vs Scalar

Ecosystem

  • Workflows
  • Forms
  • Marketplace
  • Integrations
  • MCP Servers
  • Digital Rooms
  • Product OS

Free Tools

  • JSON Formatter
  • JSON Validator
  • JWT Decoder
  • OpenAPI Validator
  • cURL → Code
  • YAML ↔ JSON
  • All free tools →

Resources

  • Free Developer Tools
  • Blog
  • Guides
  • API Glossary
  • Help Center
  • Support

© 2026 Modlific. All rights reserved.

Privacy PolicyTerms of Service