Code · best for

Top picks for Regex Writing (2026)

Crafting regular expressions that actually match what you intend. Ranked from 452 live models on the OpenRouter catalog, weighted for reasoning quality, low cost.

Updated 2026-10-13 · prices checked at this morning's rebuild

What this is Ranked by capability match + real benchmark scores (Aider Polyglot, Artificial Analysis Intelligence Index) + live pricing. Models need the right specs for Regex Writing, then benchmark performance refines the order. Full methodology →

Which should you use? Anthropic: Claude Opus 4.7 (batch) tops this ranking on blended score. If cost drives the decision, OpenAI: o4 Mini (batch) is the cheapest of the leaders at $0.55/M input.

#ModelScoreIn / 1MOut / 1MContext
1 Anthropic: Claude Opus 4.7 (batch)anthropic/claude-opus-4.7:batch 132 $2.50 $12.50 1,000,000 Details →
2 OpenAI: o3 (batch)openai/o3:batch 131 $1.00 $4.00 200,000 Details →
3 Anthropic: Claude Sonnet 4.6 (batch)anthropic/claude-sonnet-4.6:batch 131 $1.50 $7.50 1,000,000 Details →
4 OpenAI: o3openai/o3 130 $2.00 $8.00 200,000 Details →
5 OpenAI: o4 Mini (batch)openai/o4-mini:batch 130 $0.55 $2.20 200,000 Details →
6 OpenAI: o4 Miniopenai/o4-mini 129 $1.10 $4.40 200,000 Details →
7 OpenAI: GPT-5 (batch)openai/gpt-5:batch 129 $0.62 $5.00 400,000 Details →
8 Anthropic: Claude Sonnet 4.6anthropic/claude-sonnet-4.6 129 $3.00 $15.00 1,000,000 Details →
9 OpenAI: GPT-5openai/gpt-5 128 $1.25 $10.00 400,000 Details →
10 Anthropic: Claude Sonnet 5.5 (batch)anthropic/claude-sonnet-5.5:batch 128 $1.00 $5.00 1,000,000 Details →
11 OpenAI: GPT-5.4 (batch)openai/gpt-5.4:batch 128 $1.25 $7.50 1,050,000 Details →
12 Google: Gemini 2.5 Flash (batch)google/gemini-2.5-flash:batch 127 $0.15 $1.25 1,048,576 Details →
13 Google: Gemini 2.5 Flashgoogle/gemini-2.5-flash 127 $0.30 $2.50 1,048,576 Details →
14 Xiaomi: MiMo-V2.6-Proxiaomi/mimo-v2.6-pro 127 $0.43 $0.87 1,050,000 Details →
15 OpenAI: GPT-6.1 Sol (batch)openai/gpt-6.1-sol:batch 127 $1.00 $5.00 1,050,000 Details →
From this site PicksByModel API These rankings as live JSON: quality scores, pricing, and context for every model.
See plans →

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 →

Related tasks

The Model Movers Report

One email every Friday, built from this site's own rankings: the current top five by benchmark score, every model released in the last seven days, and one note worked out from that week's numbers. You can unsubscribe from any issue with one click.