• COORDINATES
  • GROUPS
  • DATA
  • HUMAN

How to find substring positions with your agent

Connect this MCP to your agent to pinpoint exactly where specific text starts and ends. Your agent handles the math while you focus on the content.

Ask AI about this page

Our technology reaches across leading technology and enterprise teams.

  • Amazon
  • NVIDIA
  • Red Hat
  • Fidelity Investments
  • Intuit
  • OLX Brasil
  • Writesonic
  • Artium
  • Trolley
Bunny World Voxel Workspace

Short answer

How can I get the exact character indices for a word?

Your agent uses the extract_substring_indices tool to scan text and return the precise start and end positions for any pattern you define. You'll get a clean set of coordinates for each match found.

Where each match lands.

The outcomes of your search.

Once you provide the text and the pattern, your agent delivers these specific results.

COORDINATES

Exact character indices

Your agent identifies the start and end numbers for each instance of your target string. This lets you map out text precisely.

GROUPS

Captured text segments

If you use regex groups, your agent pulls out the specific parts of the string you care about. You get the content and its location.

DATA

Structured index lists

The results come back as organized data rather than a list of words. You can use these numbers for further processing.

HUMAN

Manual verification

You decide if the identified positions are correct for your specific use case. Your agent provides the math, but you provide the final judgment.

The workflow

What your agent does when the text arrives.

Your agent acts as a precision instrument for text analysis.

  1. Pattern matching

    Your agent analyzes your target string or regex pattern against the provided text block.

    extract_substring_indices
  2. Index calculation

    It calculates the zero-based start and end positions for each match found in the string.

    extract_substring_indices
  3. Group isolation

    Your agent isolates specific sub-sections of the match if you have defined capture groups.

    extract_substring_indices
  4. Result formatting

    Your agent organizes the indices into a readable format for your next instruction.

    extract_substring_indices

Vinkius Agentic Execution Platform

State the outcome. Agents take it from there.

You don't have to drive this run by hand. Inside the Vinkius Agentic Execution Platform, agents pick up the task above and carry it to the end: you set the limits, you watch the steps, you keep all decisions.

Run it in Vinkius

Agents carry the task to the end

Agents execute Regex Execution and Group Extractor tasks from end to end inside the Vinkius Agentic Execution Platform: set the outcome, and the steps run.

Take it to any compatible AI

One connection, any client

Same connection follows you to ChatGPT, Claude, Gemini and any other client you love. Switch whenever you want: your connection, your permissions and your record move with you.

Spaces

One Space per activity

A Space gathers the context, tools and tasks of one activity, so you coordinate several agents at once and follow each execution as it happens.

Limits

Autonomy inside limits you set

Permissions and spending limits are yours to define. Agents halt for your approval on anything sensitive, and you choose how far autonomy goes, step by step or end to end.

Record

All steps, on the record

Each action your agents take lands in a signed audit trail. Results are verified, mistakes are learned from, and an emergency stop is one click away.

Models

Included in your plan

A curated selection of AI models is included in your plan, and you can add your own through BYOK whenever you prefer.

Try it

Copy these to start.

Use these prompts to trigger the extraction immediately.

Starting points

Swap the bracketed text for your actual content or specific regex patterns.

Regex Execution and Group Extractor Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_bqecvs0zwI2Mo0D7mpR9q5WwdocPVl4csBES81nH/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat, Regex Execution and Group Extractor capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "regex-execution-and-group-extractor-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_bqecvs0zwI2Mo0D7mpR9q5WwdocPVl4csBES81nH/mcp"
    }
  }
}
Copy into chat04
  • 01

    Find the start and end indices for the word [target word] in this [document/email/log].

  • 02

    Using regex, find the positions of all [pattern, e.g., email addresses] in this [text block].

  • 03

    Extract the character indices for the text inside the brackets in this [file content].

  • 04

    Locate the exact positions of each instance of [string] within this [message].

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Regex Execution and Group Extractor once, then ask.

One click connects this MCP to your client. Your credentials stay encrypted, and you can start asking for indices right away.

Connect Regex Execution and Group Extractor to your agent

FAQ

How this task behaves.

  • 01

    Can your agent change the text it finds?

    No. This MCP only reads and identifies positions. It cannot modify, delete, or rewrite your original text.

  • 02

    Does it work with complex regex?

    Yes. The tool is designed to handle standard regex patterns, including capture groups.

  • 03

    Will your agent automatically save these indices to a file?

    No. Your agent provides the indices in the chat. You must decide if you want to copy them or move them elsewhere.

  • 04

    Can it find overlapping matches?

    The behavior depends on the specific regex pattern you provide to the tool.

  • 05

    Is the indexing zero-based?

    Yes, the indices returned follow standard zero-based positioning.

  • More questions about Regex Execution and Group Extractor? The Connector page answers them. See everything the Regex Execution and Group Extractor Connector can do

Building with AI? Ship this whole workflow in your product.

Vinkius Connect is the connectivity layer for AI builders. All the capabilities used on this page, from Regex Execution and Group Extractor to thousands more, arrive through one SDK, already maintained for you. One Application, unlimited seats, each with their own connectors and credentials, isolated and never exposed to Vinkius. No OAuth flows to write, no tokens to store, no APIs to chase.

Explore Vinkius Connect

TypeScript · Python · Java · Go · C# · PHP · Rust

  • 01

    Your customers bring their own keys.

    Each user connects their own apps and keeps their own credentials. Vinkius only sees the identifier your backend sends.

  • 02

    Whole catalog, kept current.

    Regex Execution and Group Extractor plus thousands more, maintained and growing daily. No integrations to write, no token storage, no OAuth plumbing.

  • 03

    Any agent, any model.

    Capabilities land as framework-neutral objects, with adapters for OpenAI, Anthropic, Gemini, the Vercel AI SDK, LangChain and more.

Connect Regex Execution and Group Extractor to Claude, Cursor, ChatGPT & more

From idea to done

See what gets done when the agents take over the busywork

Each workflow on this page runs on the same platform. Connect your tools once, and your agents keep working in any AI you trust.