x402

Regex Generate (x402)

Describe what you want to match in natural language, get a tested regex back. Optionally provide test strings for validation.

get/x402/v2/regex-generate

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/regex-generate
  • Auth: none required

Query parameters

descriptionstring required

What to match in natural language

unknown

Response

Success

flagsstring
regexstring
explanationstring

Example response

{
  "flags": "g",
  "regex": "This is a test input for automated capability testing\\.",
  "explanation": "Matches the literal string 'This is a test input for automated capability testing.' - 'This is a test input for automated capability testing' matches the exact phrase, and '\\.' matches the literal period at the end. The 'g' flag finds all occurrences.",
  "test_results": [
    {
      "input": "This is a test input for automated capability testing.",
      "match": "This is a test input for automated capability testing.",
      "matches": true
    },
    {
      "input": "This is a test input for automated capability testing",
      "match": null,
      "matches": false
    },
    {
      "input": "this is a test input for automated capability testing.",
      "match": null,
      "matches": false
    },
    {
      "input": "This is a test input for automated capability testing. This is a test input for automated capability testing.",
      "match": "This is a test input for automated capability testing.",
      "matches": true
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.