Home / Servers / Text Toolkit / regex_match

Regex match

An MCP tool from the Text Toolkit server, hosted on mcp.hjlabs.in.

Find every match of a JavaScript regular expression in a text, with capture groups (numbered and named) and positions. Pattern up to 2 KB, text up to 200 KB; the g flag is implied.

Name on the gateway: text__regex_match · read-only.

Parameters

NameTypeDescription
pattern requiredstringThe regular expression, without slashes, e.g. "(\\w+)@(\\w+\\.com)".
text requiredstringText to search.
flagsstringFlags from i, m, s, u, y. Default none.
limitintegerMaximum matches to return. Default 100, max 1000.

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "text__regex_match",
  "arguments": {
    "pattern": "…",
    "text": "…"
  }
}

Or connect the Text Toolkit server directly, which lists 43 tools including this one:

Run in your terminal
claude mcp add --transport http hj-text https://mcp.hjlabs.in/mcp/text \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the regex match tool with pattern set to ….

More from Text Toolkit