---
name: regex-pattern-generator-explainer
description: "Generate complex Regular Expressions and get a breakdown of how they work. Use when the user wants help with Regex Pattern Generator & Explainer. Related topics: coding, utility, data."
---

# Regex Pattern Generator & Explainer

Generate complex Regular Expressions and get a breakdown of how they work.

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **What do you need to match?** (longer free text)
- **Target Language/Flavor** (choose one: JavaScript, Python, PCRE (PHP), Java, Go)
- **Should it be case-insensitive?** (choose one: Yes, No)
- **Provide examples of matches and non-matches?** (choose one: Yes, No)
- **Elements to include in explanation** (choose any: Character classes, Quantifiers, Capture Groups, Lookaheads/Lookbehinds)

## Prompt template

## Introduction
Easily build and understand Regular Expressions.

## Regex Requirements
- What do you need to match?: {{What do you need to match?}}
- Target Language/Flavor: {{Target Language/Flavor}}
- Should it be case-insensitive? {{Should it be case-insensitive?}}

## Options
- Provide examples of matches and non-matches? {{Provide examples of matches and non-matches?}}
- Elements to include in explanation: {{Elements to include in explanation}}

---
**Goal**: Output the precise Regex pattern, test cases, and a detailed, plain-English breakdown of the pattern.

---

Source: [Regex Pattern Generator & Explainer on PromptBuild](https://promptbuild.io/prompt/hxqYrrKxWc66zPIW4LsE/regex-pattern-generator-explainer)
