Test a regular expression

Test a JavaScript regular expression against sample text and return whether it matches, plus every match with its captured groups and index. Use to verify a pattern instead of reasoning about it in your head. Input and pattern are length-capped to keep it fast and safe.

post/v1/tools/regex_test

Request

  • Base URL: https://mcp.cleanor.app
  • URL: https://mcp.cleanor.app/v1/tools/regex_test
  • Auth: none declared

Request body

patternstring required

The regex pattern (without slashes).

inputstring required

Text to test against.

flagsstring

Regex flags, e.g. "gi". Allowed: g i m s u y d.

Response

Tool result: data (structured) and text (human-readable).

okboolean
toolstring
dataobject nullable
textstring
attributionstring

Changes

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