• Pricing
  • Blog
Sign InGet Started

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

Testing a pattern from an API's validation rules?

Specway shows the pattern, format and enum constraints from your OpenAPI schemas right in the docs, so developers see the rules before they hit a 400.

Host your API docs freeSee pricing

Free plan: 1 API, 1,000 views a month, no credit card, no time limit.

  • Interactive reference docs generated from your OpenAPI spec
  • A try-it playground that sends real requests to your API
  • A docs assistant that answers questions from the spec

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.

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

Ship API docs that stay this clean

Specway turns one OpenAPI spec into a hosted developer portal, an MCP server and llms.txt. When the spec changes, the docs follow.

Try Specway free

Free plan: 1 API, 1,000 views a month, no credit card, no time limit.

API docs that developers and AI agents can use.

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

Product

  • Pricing
  • API Directory
  • Live Demo
  • About
  • Contact

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

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

Testing a pattern from an API's validation rules?

Specway shows the pattern, format and enum constraints from your OpenAPI schemas right in the docs, so developers see the rules before they hit a 400.

Host your API docs freeSee pricing

Free plan: 1 API, 1,000 views a month, no credit card, no time limit.

  • Interactive reference docs generated from your OpenAPI spec
  • A try-it playground that sends real requests to your API
  • A docs assistant that answers questions from the spec

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.

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

Ship API docs that stay this clean

Specway turns one OpenAPI spec into a hosted developer portal, an MCP server and llms.txt. When the spec changes, the docs follow.

Try Specway free

Free plan: 1 API, 1,000 views a month, no credit card, no time limit.

API docs that developers and AI agents can use.

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

Product

  • Pricing
  • API Directory
  • Live Demo
  • About
  • Contact

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