Top picks for Regex Writing (2026)
Crafting regular expressions that actually match what you intend. Ranked from 446 live models on the OpenRouter catalog, weighted for reasoning quality, low cost.
Updated 2026-11-06 · prices checked at this morning's rebuild
Which should you use? Anthropic: Claude Opus 4.7 (batch) tops this ranking on blended score. If cost drives the decision, OpenAI: GPT-5.6 Luna (batch) is the cheapest of the leaders at $0.10/M input.
| # | Model | Score | In / 1M | Out / 1M | Context | |
|---|---|---|---|---|---|---|
| 1 | Anthropic: Claude Opus 4.7 (batch)anthropic/claude-opus-4.7:batch | 142 | $2.50 | $12.50 | 1,000,000 | Details → |
| 2 | Anthropic: Claude Sonnet 4.6 (batch)anthropic/claude-sonnet-4.6:batch | 141 | $1.50 | $7.50 | 1,000,000 | Details → |
| 3 | Anthropic: Claude Sonnet 4.6anthropic/claude-sonnet-4.6 | 139 | $3.00 | $15.00 | 1,000,000 | Details → |
| 4 | Anthropic: Claude Opus 4.8 (batch)anthropic/claude-opus-4.8:batch | 137 | $2.50 | $12.50 | 1,000,000 | Details → |
| 5 | OpenAI: GPT-5.4 (batch)openai/gpt-5.4:batch | 137 | $1.25 | $7.50 | 1,050,000 | Details → |
| 6 | OpenAI: GPT-5.5 (batch)openai/gpt-5.5:batch | 137 | $2.50 | $15.00 | 1,050,000 | Details → |
| 7 | OpenAI: GPT-5.6 Luna (batch)openai/gpt-5.6-luna:batch | 136 | $0.10 | $0.60 | 1,050,000 | Details → |
| 8 | OpenAI: GPT-5.6 Lunaopenai/gpt-5.6-luna | 136 | $0.20 | $1.20 | 1,050,000 | Details → |
| 9 | OpenAI: GPT-5.6 Sol (batch)openai/gpt-5.6-sol:batch | 136 | $2.00 | $10.00 | 1,050,000 | Details → |
| 10 | OpenAI: GPT-5 (batch)openai/gpt-5:batch | 136 | $0.62 | $5.00 | 400,000 | Details → |
| 11 | OpenAI: GPT-5.6 Terra (batch)openai/gpt-5.6-terra:batch | 136 | $1.00 | $6.00 | 1,050,000 | Details → |
| 12 | Anthropic: Claude Sonnet 5 (batch)anthropic/claude-sonnet-5:batch | 136 | $1.00 | $5.00 | 1,000,000 | Details → |
| 13 | OpenAI: GPT-5.4openai/gpt-5.4 | 136 | $2.50 | $15.00 | 1,050,000 | Details → |
| 14 | MoonshotAI: Kimi K2.6moonshotai/kimi-k2.6 | 136 | $0.65 | $3.41 | 262,144 | Details → |
| 15 | DeepSeek: DeepSeek V4 Pro 0423deepseek/deepseek-v4-pro | 136 | $0.96 | $1.91 | 1,048,576 | Details → |
How we ranked these
For Regex Writing, we weight models on reasoning quality, low cost. Scores combine each model's public specs with independent benchmark results (Aider Polyglot coding scores, Artificial Analysis intelligence/coding/agentic indices) and live pricing. See full methodology →