Development
Test Python re patterns online: (?P<name>…) named groups, (?P=name) backreferences, VERBOSE patterns, findall behavior, and \g<name> replace templates — plus ready-to-paste Python code.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/python-regex-tester' \
-H 'Content-Type: application/json' \
-d '{"pattern":"(?P<first>\\w+)\\s+(?P<last>\\w+)","subject":"Ada Lovelace, Grace Hopper","flag_i":false,"flag_m":false,"flag_s":false,"flag_x":false,"flag_a":false,"flag_g":true,"replacement":"\\g<last>, \\g<first>","unicodeClasses":true}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST http://127.0.0.1:3003/en/api/tools/python-regex-tester| Name | Type | Required | Description |
|---|---|---|---|
| pattern | text | Yes | — |
| subject | textarea | No | — |
| flag_i | checkbox | No | — |
| flag_m | checkbox | No | — |
| flag_s | checkbox | No | — |
| flag_x |
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-python-regex-tester": {
"name": "python-regex-tester",
"description": "Test Python re patterns online: (?P<name>…) named groups, (?P=name) backreferences, VERBOSE patterns, findall behavior, and \\g<name> replace templates — plus ready-to-paste Python code.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=python-regex-tester",
"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": "python-regex-tester",
"arguments": {
"pattern": "(?P<first>\\w+)\\s+(?P<last>\\w+)",
"subject": "Ada Lovelace, Grace Hopper",
"flag_i": false,
"flag_m": false,
"flag_s": false,
"flag_x": false,
"flag_a": false,
"flag_g": true,
"replacement": "\\g<last>, \\g<first>",
"unicodeClasses": true
}
}
}| checkbox |
| No |
| — |
| flag_a | checkbox | No | — |
| flag_g | checkbox | No | — |
| replacement | text | No | — |
| unicodeClasses | checkbox | No | — |
HTML result
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Questions or issues? Contact [email protected]