Skip to main content
Glama

extract_from_column

Extract specific patterns from data columns using regex capturing groups, enabling structured data parsing for email components, product codes, names, and date elements.

Instructions

Extract patterns from a column using regex with capturing groups.

Returns: ColumnOperationResult with extraction details

Examples: # Extract email parts extract_from_column(ctx, "email", r"(.+)@(.+)")

# Extract code components extract_from_column(ctx, "product_code", r"([A-Z]{2})-(\d+)") # Extract and expand into multiple columns extract_from_column(ctx, "full_name", r"(\w+)\s+(\w+)", expand=True) # Extract year from date string extract_from_column(ctx, "date", r"\d{4}")

Input Schema

NameRequiredDescriptionDefault
columnYesColumn name to extract patterns from
patternYesRegex pattern with capturing groups to extract
expandYesWhether to expand multiple groups into separate columns

Input Schema (JSON Schema)

{ "properties": { "column": { "description": "Column name to extract patterns from", "type": "string" }, "expand": { "description": "Whether to expand multiple groups into separate columns", "type": "boolean" }, "pattern": { "description": "Regex pattern with capturing groups to extract", "type": "string" } }, "required": [ "column", "pattern", "expand" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonpspri/databeak'

If you have feedback or need assistance with the MCP directory API, please join our Discord server