Regex Generator for SEO
Generate regex patterns from plain English descriptions for SEO tasks.
#about
Claude Sonnet 4.5/4, Haiku 4.5 or GPT-4o/4o-mini with "regex expert specialising in SEO" system prompt.
Platform contexts: GSC, .htaccess, Screaming Frog, etc.
JSON output: pattern, explanation, flags, examples, platform notes.
Built-in tester with match metrics and visual indicators.
Streamlit appRequires an API key
- Platform
- Browser-based (no installation required)
- Input
- Anthropic or OpenAI API keyPlain English pattern descriptionUp to 4 test strings that should match
- Output
- Regex pattern, explanation, required flags, example matches/non-matches, platform notes.
- Category
- Technical SEO
Use cases
- GSC query and page filters
- .htaccess redirect rules
- Screaming Frog extraction
- Log file analysis
- URL pattern matching
#features
- Platform-specific context (GSC/.htaccess/SF)
- JSON output with explanation and examples
- Ten preset SEO patterns (no API key needed)
- Standalone pattern tester with match metrics
- Up to 4 test strings when generating
#how-to-use
- Enter API key and select model
- Select platform context (GSC, Apache, etc.)
- Describe needed pattern in plain English
- Add test strings for validation
- Review pattern with syntax highlighting and test results
#faq
- Do I need an API key for every part of the tool?
- No, only the Generate from Description tab calls an LLM. The Preset Patterns tab (ten ready-made SEO patterns like pagination, UTM parameters and trailing slashes) and the Test Regex tab both work entirely offline with no key. If you just want to test a pattern you already have, skip the key.
- Why does a correct .htaccess pattern fail the built-in test?
- The tester runs patterns through Python's re module, but the generator is told to produce Apache mod_rewrite syntax for .htaccess and RE2 syntax for Google Search Console. Platform-specific constructs can therefore fail or behave differently in the tester while still being correct on the target platform. Treat the test results as a sanity check and verify on the actual platform.
- Which flags does the tester actually apply?
- Only case-insensitivity: if the flags string contains an i, the pattern is compiled with re.IGNORECASE. Any other flags the model suggests are shown but ignored during testing. Matching uses re.search, so a pattern counts as a match if it matches anywhere in the string, not just the whole string.
- How does the platform selection change the output?
- The chosen context (General, Google Search Console, .htaccess, Screaming Frog, Google Analytics, Nginx, Log Files) is injected into the prompt with explicit rules: Apache mod_rewrite syntax for .htaccess, RE2 with no lookbehinds for GSC, standard regex for Screaming Frog. The response also includes a platform_notes field with caveats specific to your selection.
- What does a generation cost?
- One API call per click of Generate Regex, capped at 1024 output tokens on the Anthropic path, billed to your own key. Choosing claude-haiku-4-5 or gpt-4o-mini keeps each generation to a fraction of a cent; there is no batching or background usage.
- How many test strings can I provide?
- The generation tab accepts up to 4 test strings, which are sent to the model as examples that must match. The separate Test Regex tab has no such limit: paste as many strings as you like, one per line, and it reports a match count plus the exact matched text for each.
/contact
Want me to run this for you? I run this tool as a managed service, or build something custom around your data. You get the insights without touching the code.