SnipTray logo
Coding

Regex from a description

The pattern, plus what it deliberately excludes.

  • regex
  • parsing
  • validation

The prompt

Write a {{flavour}} pattern that matches {{match}}.

Give the pattern, then a short table of examples: five that match and five that
look like they should but do not, with a word on why. Then say what the pattern
will get wrong if the input is hostile.

If a regex is the wrong tool here, say so and name the right one.

What to fill in

{{match}}
What should match — e.g. {{key}} placeholders, allowing inner spaces
{{flavour}}
Flavour — e.g. NSRegularExpression

117 prompts, in the app you already paste from

The whole library, searchable, with your own prompts alongside it. Free to browse here; Pro to keep them a keystroke away on every device.