Regex Tester
Test JavaScript regex patterns locally with live highlighting and flags for global, case-insensitive, multiline, dotAll, unicode, and sticky matching.
What does Regex Tester do?
Regex Tester tests regular expressions against sample text with live match feedback.
- Primary use: Regex Tester tests regular expressions against sample text with live match feedback.
- Key technical fact: JavaScript regular expressions are defined by ECMAScript and support flags such as
g,i,m,s,u, andy. - Practical check: Review Unicode, whitespace, line break, and punctuation behavior before treating the output as production text.
| Topic | Direct answer | Source |
|---|---|---|
| Direct answer | Regex Tester tests regular expressions against sample text with live match feedback. | ECMAScript specification |
| Key fact | JavaScript regular expressions are defined by ECMAScript and support flags such as g, i, m, s, u, and y. |
ECMAScript specification |
| Processing model | Runs locally in the browser; no production Node server receives the input. | Browser JavaScript |
Test JavaScript regex patterns against real text
Regex Tester lets you try a JavaScript regular expression against sample input before using it in code, validation, log parsing, or search workflows. Matches are highlighted as you edit the pattern or text, so it is easier to see what the expression actually captures.
Patterns use the browser's JavaScript regex engine. Enter the pattern without leading and trailing slashes, then choose flags such as g, i, m, s, u, and y. Escaping, Unicode mode, line endings, and greedy matching can all change results.
How to use
- Type or paste a regex pattern into the Regex Pattern input field. You do not need to include the leading and trailing slashes.
- Select the flags you need: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), or y (sticky).
- Enter or paste your test text into the editor below.
- Matches are highlighted automatically. The match count appears in the status bar.
- Use Copy to copy the test text to the clipboard, Download to save it as a file, or Clear to reset everything.
What is Regex Tester?
Regex Tester is a browser-based pattern sandbox for checking whether a JavaScript regular expression matches the text you expect. It is useful for email-like strings, IDs, delimiters, config values, URLs, and log fields.
Regex results are engine-specific. A pattern that works here follows JavaScript behavior, which may differ from PCRE, Python, Java, grep, or database regex dialects. Re-test important expressions in the runtime where they will be used.
Input notes
Paste representative text, including blank lines and punctuation that appear in production. Use g when you need all matches, m when ^ and $ should apply per line, and u when Unicode handling matters.
Example
A simple email-like pattern with the global flag finds two addresses and ignores malformed fragments:
--- Pattern --- \b\w+@\w+\.\w+\b --- Flags --- g (global) --- Test Text --- Contact us at [email protected] or [email protected]. Invalid: @missing.com or user@ --- Matches Found --- 2 matches: 1. [email protected] 2. [email protected]
MCP integration
MCP (Model Context Protocol) lets AI agents and apps discover and run Coding.Tools utilities for repeatable conversions, formatting, hashing, and generation workflows.
MCP tool name: regex-tester
MCP endpoint: https://coding.tools/mcp
Call tools/list first. Each tool entry includes inputSchema, outputSchema, and examples so an AI agent or client can build valid arguments without guessing.
For tools/call, read result.content[0].text for the display value and result.structuredContent for machine parsing. Tool-level failures return isError: true; protocol failures return a JSON-RPC error.
Example tools/call request:
curl -s https://coding.tools/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"regex-tester","arguments":{"input":"Order #A102 total $58.40","options":{"pattern":"#[A-Z]\\d+","flags":"g"}}}}'
Most text and data tools accept an input string plus optional options. Browser-only image tools are listed for discovery and return a web UI link when they need browser image APIs.