Overview
- Category
- Developer Tools
- API mode
not_available- Processing
- client-side
- Privacy
- no-data-stored
Public descriptor
The descriptor is available without an API key and supplies this tool’s metadata, schemas, modes, and examples.
GET /api/v1/tools/regex-generator
Execute availability
This tool is documented as a browser capability. Its execute route does not produce a server-side result; when execution is enabled, it responds with browser_interaction_required and points callers to the public tool page.
POST /api/v1/tools/regex-generator/execute
Authentication is not issued during the preview. A bearer API key is planned for execution after launch.
Input schema
object object; additional properties are not accepted.
source· string · required- Enter example text.
target· string · required-
Enter match target. Accepted values:
letters, numbers, letters_and_numbers, email_like, custom_literal. literal· string · optional- Enter custom literal.
quantity· string · required-
Enter quantity. Accepted values:
exactly_one, one_or_more, zero_or_more. case_sensitive· string · required-
Enter case sensitive. Accepted values:
yes, no.
{
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Enter example text."
},
"target": {
"type": "string",
"description": "Enter match target.",
"enum": [
"letters",
"numbers",
"letters_and_numbers",
"email_like",
"custom_literal"
]
},
"literal": {
"type": "string",
"description": "Enter custom literal."
},
"quantity": {
"type": "string",
"description": "Enter quantity.",
"enum": [
"exactly_one",
"one_or_more",
"zero_or_more"
]
},
"case_sensitive": {
"type": "string",
"description": "Enter case sensitive.",
"enum": [
"yes",
"no"
]
}
},
"required": [
"source",
"target",
"quantity",
"case_sensitive"
],
"additionalProperties": false
}
Output schema
On a successful execution, schema values appear in data.result.values.
pattern· string- Regular expression produced by the tool.
flags· string- Flags produced by the tool.
matches· array- Example matches produced by the tool.
{
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Regular expression produced by the tool."
},
"flags": {
"type": "string",
"description": "Flags produced by the tool."
},
"matches": {
"type": "array",
"description": "Example matches produced by the tool."
}
},
"additionalProperties": false
}
Regex Generator worked example
The request body follows the published input schema. The response below shows the success-envelope shape returned after execution is available.
curl -X POST "https://utilitypages.org/api/v1/tools/regex-generator/execute" \
-H "Content-Type: application/json" \
-d '{
"source": "Tool-123 and Page-456",
"target": "letters_and_numbers",
"literal": "Tool",
"quantity": "one_or_more",
"case_sensitive": "no"
}'
{
"ok": true,
"data": {
"slug": "regex-generator",
"result": {
"values": {
"pattern": "/[A-Za-z0-9]+/gi",
"flags": "gi",
"matches": [
{
"index": 1,
"match": "Tool",
"offset": 0
},
{
"index": 2,
"match": "123",
"offset": 5
},
{
"index": 3,
"match": "and",
"offset": 9
},
{
"index": 4,
"match": "Page",
"offset": 13
},
{
"index": 5,
"match": "456",
"offset": 18
}
]
},
"display": {
"display": "/[A-Za-z0-9]+/gi"
},
"warnings": [],
"assumptions": [],
"steps": []
}
},
"meta": [],
"request_id": "req_example_123"
}
Errors
api_not_launched· 503- Returned by the current launch gate for every execute request.
invalid_json· 400- Returned when an enabled execute request does not contain valid JSON.
validation_failed· 422- Returned when a request does not satisfy the input schema.
browser_interaction_required· 422- Returned for browser capability tools instead of inventing a server-side result.
tool_not_found· 404- Returned when a requested descriptor slug does not exist.
execution_failed· 503- Returned when an enabled server-side execution cannot complete.