Development
Test PCRE2 patterns online: every named-group syntax ((?P<n>), (?<n>), (\u0027n\u0027)), possessive quantifiers, atomic groups, \A \z \h shorthands, plus pcre2grep and C API snippets.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/pcre-regex-tester' \
-H 'Content-Type: application/json' \
-d '{"pattern":"\\A(?<ts>[0-9:]{8})\\s+(?P<level>WARN|ERROR)\\s+(?P<code>\\d+)","subject":"12:04:31 ERROR 5008 boot failed\n12:04:33 WARN 12 retry\n12:04:35 ERROR 5009 giving up","flag_i":false,"flag_m":false,"flag_s":false,"flag_x":false,"flag_U":false,"flag_g":true,"replacement":"\\g<name> / \\1","unicodeClasses":false}'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/pcre-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-pcre-regex-tester": {
"name": "pcre-regex-tester",
"description": "Test PCRE2 patterns online: every named-group syntax ((?P<n>), (?<n>), (\\u0027n\\u0027)), possessive quantifiers, atomic groups, \\A \\z \\h shorthands, plus pcre2grep and C API snippets.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=pcre-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": "pcre-regex-tester",
"arguments": {
"pattern": "\\A(?<ts>[0-9:]{8})\\s+(?P<level>WARN|ERROR)\\s+(?P<code>\\d+)",
"subject": "12:04:31 ERROR 5008 boot failed\n12:04:33 WARN 12 retry\n12:04:35 ERROR 5009 giving up",
"flag_i": false,
"flag_m": false,
"flag_s": false,
"flag_x": false,
"flag_U": false,
"flag_g": true,
"replacement": "\\g<name> / \\1",
"unicodeClasses": false
}
}
}| checkbox |
| No |
| — |
| flag_U | 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]