Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Regex Entity Extractor

text.extract_entities_regex

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
File inputNo network

Overview

You give us labelled regular expressions and text; we run them on the RE2/J engine, which cannot blow up on backtracking, and hand back every match with its label, its exact value, and its character offsets, ordered by position. Up to 100 patterns per call and 1,000 matches per pattern by default. A pattern that fails to compile is reported as a warning rather than failing your whole call. Accepts file input via file_ref — no need to extract file content first.

LLMs hallucinate regex patterns and miss matches. We execute your patterns with RE2/J for linear-time, offset-annotated, complete results.

Reliability

STRICT and deterministic — identical text and patterns always produce identical matches. RE2/J guarantees linear-time execution without catastrophic backtracking. A pattern with invalid syntax does not fail the call — we skip it and tell you in warnings, so check that array before trusting an empty result. Input validation (not retryable): patterns missing, empty, not an array of objects, or more than 100 entries; neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters.

Context footprint

Accepts inline text up to ~1M chars or file_ref (up to 2 MB). Upload files via POST /v1/files/upload before passing file_ref. A successful call costs 2 execution credits.

When to use it

When you have known patterns for entities (IDs, emails, codes) and need reliable extraction with position tracking.

Do not use when entities lack known patterns and require semantic understanding, or when you need to validate regex syntax first (use text.validate_regex).

Powered by RE2/J, Google's linear-time regular-expression engine that extracts matches safely without catastrophic backtracking.

Scope

Note
Extracts entities from your text using caller-defined RE2/J regex patterns, returning labeled matches with character offsets in deterministic order.

Non-goals

  • Does not perform NER or ML-based entity recognition
  • Does not infer patterns — you supply every regex
  • Does not validate or normalize extracted values beyond the match text

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

parsingtext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input1 MBMax file size1.9 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file1.9 MiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify using a self-contained open-source component
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Self contained open source component
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
textstringNoBounded inline text source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both.
patternsarrayYesBounded array containing 1 through 100 pattern objects with pattern and label properties. The item shape is defined by the nested schema and the array contains from 1 through 100 items.
maxMatchesPerPatternintegerNoPer-pattern match cap; omit it for one thousand.

Output schema

FieldTypeRequiredDescription
matchesarrayYesBounded array of lexical match receipts with label, value, start, and end properties. The item shape is defined by the nested schema and the array contains from 0 through 100000 items.
totalMatchesintegerYesReturned match count.
patternCountintegerYesEvaluated pattern count.
warningsarrayYesBounded warning array containing from 0 through 10000 items, where each item is one non-fatal advisory string.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.extract_entities_regex","input":{"text":"Contact [email protected] for support.","patterns":[{"pattern":"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}","label":"email"}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("text.extract_entities_regex", {"patterns":[{"pattern":"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}","label":"email"},{"pattern":"\\+?1?[-.]?\\(?\\d{3}\\)?[-.]?\\d{3}[-.]?\\d{4}","label":"phone"}],"text":"Please contact support at [email protected] or call +1-555-867-5309 for order issues. Alternatively, reach [email protected] for invoices."});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not perform NER or ML-based entity recognition
  • Does not infer patterns — you supply every regex
  • Does not validate or normalize extracted values beyond the match text
  • Named entity recognition without known patterns
  • Semantic entity extraction requiring context understanding
  • Complex nested or recursive pattern matching beyond RE2/J limits

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.extract_entities_regex",
  "input": {
    "patterns": [
      {
        "pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
        "label": "email"
      },
      {
        "pattern": "\\+?1?[-.]?\\(?\\d{3}\\)?[-.]?\\d{3}[-.]?\\d{4}",
        "label": "phone"
      }
    ],
    "text": "Please contact support at [email protected] or call +1-555-867-5309 for order issues. Alternatively, reach [email protected] for invoices."
  }
}

Examples

Extract emails and phone numbers

Inputjson
{
  "patterns": [
    {
      "pattern": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",
      "label": "email"
    },
    {
      "pattern": "\\+?1?[-.]?\\(?\\d{3}\\)?[-.]?\\d{3}[-.]?\\d{4}",
      "label": "phone"
    }
  ],
  "text": "Please contact support at [email protected] or call +1-555-867-5309 for order issues. Alternatively, reach [email protected] for invoices."
}
Expected outputjson
{
  "totalMatches": 3,
  "patternCount": 2,
  "warnings": [],
  "matches": [
    {
      "label": "email",
      "value": "[email protected]",
      "start": 26,
      "end": 39
    },
    {
      "label": "phone",
      "value": "+1-555-867-5309",
      "start": 48,
      "end": 63
    },
    {
      "label": "email",
      "value": "[email protected]",
      "start": 103,
      "end": 119
    }
  ]
}

Extract order IDs from logs

Inputjson
{
  "patterns": [
    {
      "pattern": "ORDER-\\d{6}",
      "label": "order_id"
    }
  ],
  "text": "2026-05-20 Processing ORDER-482917 shipped. 2026-05-21 Refund initiated for ORDER-113042."
}
Expected outputjson
{
  "totalMatches": 2,
  "patternCount": 1,
  "warnings": [],
  "matches": [
    {
      "label": "order_id",
      "value": "ORDER-482917",
      "start": 22,
      "end": 34
    },
    {
      "label": "order_id",
      "value": "ORDER-113042",
      "start": 76,
      "end": 88
    }
  ]
}
  • Extract ticket numbers, order IDs, or internal codes from support text
  • Pull email addresses or phone numbers from unstructured messages
  • Parse log lines for timestamps, error codes, or request IDs

Avoid for

  • Named entity recognition without known patterns
  • Semantic entity extraction requiring context understanding
  • Complex nested or recursive pattern matching beyond RE2/J limits

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

textanalysisparsing