text

Test a regular expression against text and inspect every match and capture group.

Runs a JavaScript regular expression and returns each match with its index, numbered groups and named groups — or performs a replace or split. Invalid patterns come back as a readable explanation instead of a thrown error, so a pattern can be corrected without a round trip through a broken deploy.

get/v1/regex/test

Request

  • Base URL: https://fluentedi.com
  • URL: https://fluentedi.com/v1/regex/test
  • Auth: none declared

Query parameters

patternstring required

Regular expression source, without delimiters.

Example:\b(\w+)@(\w+\.\w+)\b
textstring required

Text to run the pattern against.

flagsstring

Regex flags, e.g. "gi". The g flag is added automatically for match_all, replace and split.

operation'match_all' | 'test' | 'replace' | 'split'

What to do with the pattern.

replacementstring

Replacement string for the replace operation. Supports $1, $<name>.

limitinteger

Maximum matches to return.

Response

Tool result.

okboolean
toolstring
resultobject

Tool-specific result payload.

Changes

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