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
| Name | Type | Description |
|---|---|---|
pattern required | string | The regular expression, without slashes, e.g. "(\\w+)@(\\w+\\.com)". |
text required | string | Text to search. |
flags | string | Flags from i, m, s, u, y. Default none. |
limit | integer | Maximum 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:
{
"name": "text__regex_match",
"arguments": {
"pattern": "…",
"text": "…"
}
}Or connect the Text Toolkit server directly, which lists 43 tools including this one:
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 ….