Development
Test java.util.regex patterns online: (?<name>…) named groups, possessive quantifiers and atomic groups, Pattern flags, ASCII vs UNICODE_CHARACTER_CLASS \d semantics, and ready-to-paste Java code.
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/java-regex-tester' \
-H 'Content-Type: application/json' \
-d '{"pattern":"(?<user>[a-z]+)@(?<host>\\w+\\.\\w{2,})","subject":"[email protected] and [email protected], ٤٢١@nope not matched","flag_i":true,"flag_m":false,"flag_s":false,"flag_x":false,"flag_u":false,"flag_g":true,"replacement":"${name} / $1","unicodeClasses":false}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/java-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-java-regex-tester": {
"name": "java-regex-tester",
"description": "Test java.util.regex patterns online: (?<name>…) named groups, possessive quantifiers and atomic groups, Pattern flags, ASCII vs UNICODE_CHARACTER_CLASS \\d semantics, and ready-to-paste Java code.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=java-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": "java-regex-tester",
"arguments": {
"pattern": "(?<user>[a-z]+)@(?<host>\\w+\\.\\w{2,})",
"subject": "[email protected] and [email protected], ٤٢١@nope not matched",
"flag_i": true,
"flag_m": false,
"flag_s": false,
"flag_x": false,
"flag_u": false,
"flag_g": true,
"replacement": "${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]