Regex tester

Test a JavaScript pattern, read the groups, and preview a replacement.

Runs in browser

Use from your agent

Streamable HTTP at https://benchline.fabwaseem.com/mcp. No key. The tool name is test_regex.

mcp.jsonjson
1{
2 "mcpServers": {
3 "benchline": {
4 "url": "https://benchline.fabwaseem.com/mcp"
5 }
6 }
7}
tools/calljson
1{
2 "jsonrpc": "2.0",
3 "id": 1,
4 "method": "tools/call",
5 "params": {
6 "name": "test_regex",
7 "arguments": {
8 "pattern": "example",
9 "flags": "",
10 "text": "example"
11 }
12 }
13}

How it works

Free JavaScript regex tester. Set flags, see every match and capture group, read a short explanation of the pattern, and preview a replacement. The match list is exact, which is what an agent needs when a model guesses.

  1. 01

    Enter a pattern

    Type the pattern without slashes. Turn on the flags you need.

  2. 02

    Paste a sample

    Matches are marked in the sample. Each row lists the index and the groups.

  3. 03

    Preview a replacement

    Leave the replacement empty to skip it. $1 and $<name> work as they do in JavaScript.

FAQ