Skip to content

Regex from Examples

Give matching and non-matching examples and get a tested regex.

Beginner8h1 person17/20 fit
TL;DR

Build Regex from Examples for developers and data analysts in ~8h with 1 person. Stack: LLM + JavaScript.

Why it wins: Small but loved by developers.

Build flow

01 · Problem
Writing regex is error-prone and hard to read later.
02 · Solution
An LLM proposes a pattern, the tool tests it against all examples, iterates until it passes and explains each part.
03 · Build
  1. 1Collect examples
  2. 2Generate pattern
  3. 3Test and retry
  4. 4Explain
04 · Demo
Provide five examples and get a passing regex with explanation.

MVP checklist

  • Example input
  • Auto testing
  • Iteration
  • Explanation

Tech stack

TechRole
LLMLanguage model
JavaScriptGame / app logic

Related ideas

More Devtools
  • Describe a schedule in words and get a cron expression with next run times

    Beginner6h1
    JavaScriptLLM
    16/20
  • Paste a command and see what each part does before you run it

    Beginner6h1
    JavaScriptLLM
    16/20
  • Paste an error and get the likely cause, the relevant line and a fix

    Beginner10h1
    LLMNode.jsTree-sitter
    17/20