Development
Compare performance of different regex patterns, identify bottlenecks, and detect degenerate cases
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/regex-benchmark' \
-H 'Content-Type: application/json' \
-d '{"regexList":".*\n[a-z]+\n\\d+","testInput":"hello world\n12345\nabc","regexFlags":"Flags to apply to all patterns (e.g., gi, m, i)","iterations":1000,"warmupRuns":100,"targetDialect":"javascript","includeDegenerate":true}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/regex-benchmark| Name | Type | Required | Description |
|---|---|---|---|
| regexList | textarea | Yes | — |
| testInput | textarea | Yes | — |
| regexFlags | text | No | — |
| iterations | number | No | — |
| warmupRuns | number | No | — |
| targetDialect |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-regex-benchmark": {
"name": "regex-benchmark",
"description": "Compare performance of different regex patterns, identify bottlenecks, and detect degenerate cases",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=regex-benchmark",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "regex-benchmark",
"arguments": {
"regexList": ".*\n[a-z]+\n\\d+",
"testInput": "hello world\n12345\nabc",
"regexFlags": "Flags to apply to all patterns (e.g., gi, m, i)",
"iterations": 1000,
"warmupRuns": 100,
"targetDialect": "javascript",
"includeDegenerate": true
}
}
}Questions or issues? Contact [email protected]
| select |
| Yes |
| — |
| includeDegenerate | checkbox | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}