Regex Generator for SEO
Describe the pattern you need in plain English and get a regex for GSC, .htaccess, Screaming Frog and more.
#about
Writes a regex from a plain English description, with an explanation and example matches.
Generation runs on Claude Haiku by default or Claude Sonnet, or on OpenAI's GPT Luna by default or GPT Terra, with your own API key.
Choosing a platform adds syntax rules, such as RE2 with no lookbehinds for Google Search Console.
Ten preset patterns and a tester need no key, though the tester uses Python's re module, so platform-specific syntax may behave differently.
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, billed to your own key. The Anthropic path allows 4,000 output tokens (thinking included) at medium effort, and the OpenAI path also uses medium effort. Claude Haiku and GPT Luna, the defaults, keep each generation cheaper than Claude Sonnet or GPT Terra; 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.