Test regular expression patterns against input text. Returns all matches, capture groups, and their positions. Supports standard flags (i, m, s) for case-insensitive, multiline, and dotall matching.
Note: The API expects "pattern" and "text" fields. The demo sends the pattern as "input". For accurate results, use the CLI: delx regex "\\d+" --text "abc 123"
delx regex "\d+" --text "Order #12345 placed on 2024-01-15" delx regex "[A-Z]\w+" --text "Hello World" --flags i
curl -X POST https://api.delx.ai/api/v1/utils/regex \
-H "Content-Type: application/json" \
-d '{"pattern": "\\d+", "text": "Order #12345", "flags": "i"}'{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "regex",
"arguments": {
"pattern": "\\d+",
"text": "Order #12345 placed on 2024-01-15",
"flags": ""
}
}
}The backend uses Python's re module, which supports PCRE-like syntax including lookaheads, lookbehinds, and named groups.
i (case-insensitive), m (multiline -- ^ and $ match line boundaries), s (dotall -- . matches newlines).
Yes. Each match includes the full match string, all numbered capture groups, and their start/end positions in the input text.