SEO PROMPT #35·Additional SEO Workflows·Code Execution

Write & Test Regex Filters, SQL Queries, XPath, or Validation Scripts

2026-11-245 customizable variablesOne task & test cases

Generate the smallest readable regex, SQL, XPath, or validation script for a single task and verify it against valid, invalid, empty, and edge-case inputs in a strictly read-only sandbox.

Customize Variables (Live Preview)

Pick one focused task type per run.

Exact dialect/version (e.g., RE2, BigQuery SQL, XPath 1.0).

Sample dataset showing column types and edge formats.

Expected matches, exclusions, and edge-case examples.

Read-only, dry-run, and scan/resource limits.

Copy-Ready Prompt Template

Data-backed workflow: prepend the Universal Data-Grounding Preamble for safer runs.
One task: [REGEX FILTER, SQL QUERY, XPATH EXTRACTION, HREFLANG CHECK, OR REDIRECT-MAP VALIDATION]
Target tool, language, dialect, and version: [DETAILS]
Input schema and sample records: [FILES]
Expected outputs and edge cases: [EXAMPLES]
Execution boundaries: [READ-ONLY, DRY RUN, AND RESOURCE LIMITS]

Clarify any missing requirement that would change the result. Generate the smallest readable implementation for this task. Explain assumptions about URLs, nulls, duplicates, time zones, or field types where relevant.

Test representative valid, invalid, empty, and boundary inputs against the expected results. For queries and transformations, check row counts and totals so a successful run does not hide incorrect filtering or duplicated joins.

Return the code, test inputs, actual and expected outputs, and a short explanation. State exactly which tests ran. If execution is unavailable, provide runnable tests and label the code unexecuted.

Do not modify production data, deploy redirects, or change site configuration. Stop if the requested test would exceed the stated access or resource limits.

Required Inputs & Setup

Single task type, target tool/language/dialect/version, input schema & sample records, expected outputs & edge cases, and read-only/dry-run/resource limits.

Usage Notes & Guardrails

  • Always specify exact dialect (e.g., RE2 for Search Console vs. PCRE, BigQuery SQL, or Screaming Frog XPath) and verify row counts alongside syntax.