Suede AI Agent StudioTemplatesStart buildingOpen workspace
Navigation menu

Regex From Examples

Engineering template

Paste what should match and what shouldn't, get a regex that does it, explained.

Built for
Developers and data wranglers writing validators and parsers
Takes off your plate
Every match rule gets a tested regex without the trial-and-error.
  • Free to test
  • $0.04 per build, paid to you
  • You keep 100% of every sale

What Regex From Examples takes and returns

You give it

  • shouldMatch list
  • shouldNotMatch list
  • flavor text

You get back

The regex json.

How the 3-step flow works

A regex desk that works from examples instead of from a headache. Give it strings that should match and strings that should not, and it returns a single regex that separates them, a plain-English breakdown of each part, and a precise list of any examples that need further refinement. Input: should match 2024-01-09, 1999-12-31; should NOT match 2024-1-9, 99-12-31, not a date. Output: strict JSON with regex "^\\d{4}-\\d{2}-\\d{2}$", flags "", explanation[], matches_all_positives true, rejects_all_negatives true, misses [], notes "validates shape, not real calendar dates (allows 2024-13-40)".

  1. Input

    Takes the should match, should not match and flavor.

  2. Claude

    Claude works as a regex expert.

  3. Output

    Returns the regex json.

The brief behind Regex From Examples

You are a regex expert. The user provides examples that SHOULD match and examples that should NOT match (in any clear labeling, 'match'/'no match', '+'/'-', two lists, etc.). Produce one regex that accepts every positive and rejects every negative, as simple and readable as possible, prefer clarity over cleverness, anchor when appropriate, avoid catastrophic backtracking. Default to a portable flavor (PCRE/JS-compatible) unless the user names a language; note any flags needed (e.g. case-insensitive). Mentally test your regex against every provided example before answering. If no single clean pattern separates all examples, return your best pattern and list the specific examples it still misclassifies in 'misses', never claim success you cannot back up. Output STRICT JSON only with keys: regex (string, no surrounding slashes), flags (string, e.g. 'i' or ''), explanation (array of short strings, one per regex component), matches_all_positives (boolean), rejects_all_negatives (boolean), misses (array of strings: examples still misclassified), notes (string: caveats or scope limits). If positive/negative examples are not discernible, return {"error":"need should-match and should-not-match examples"}.

Build a single regex that matches all the positive examples and rejects all the negative ones, then return the strict JSON with the pattern, a per-part explanation, and any examples it still misses.

What Regex From Examples can earn

Set your price per build. Callers pay in USDC over x402, and every settled call routes to your wallet.

Your price per build
Routes to your wallet each month$1203,000 paid calls at $0.04 · Suede AI takes 0% of the sale

Put Regex From Examples to work

All 3 steps open wired, priced at $0.04 per build.

Good work starts with a clear flow.

Give an agent a job. Connect the steps. See how the work becomes a service someone else can call.

Input
Reason
Output

A workflow you can inspect

Make the steps visible.

Start with a template or describe the job. Connect inputs, reasoning, and output on the canvas.

Explore templates
Canvas in motionProduct visualization · 20 sec
Read the visual description

A stylized organization chart opens into a workflow canvas. Input and reasoning nodes connect, the flow branches, and the run moves through its steps. The film ends with Suede AI Agent Studio. Music only; no spoken narration.