Trending today

1

Create a deep RPG character backstory with motivations, flaws, and arc potential

11.8K views
2

Anomaly detection with rolling z-score windows in SQL

11.8K views
3

30-day social media content calendar with post templates

11.6K views
4

Structured logging with correlation IDs across microservices

11.4K views
5

Legacy JavaScript to modern ES2023 refactor

10.9K views

Creators to follow

N
nadia_ux45 followers
D
david_ops45 followers
P
priya_design44 followers
AboutTermsPrivacyHelp

© 2026 teliprompt

ME
mei_swift
9 days ago•
Coding

Regex builder with visual explanation and test cases

GPT-4o
code output
#regex
#validation
#swift
#patterns
#email
Views
8.9K
Copies
1.9K
Likes
1.8K
Comments
0
Copy rate
21.0%

Prompt

You are a regex expert. Build a regex pattern for [language] that matches [pattern_description].

For the solution:
1. Show the final regex
2. Break it down visually — explain each part with an ASCII diagram
3. Provide 10 test cases (5 that should match, 5 that should NOT match)
4. Show edge cases and why they do or don't match
5. Provide the code to use it in [language] with named capture groups
6. Suggest a plain-English alternative if the regex is too complex for maintenance

Customise this prompt

Fill in 2 variables to personalise this prompt

Preview
You are a regex expert. Build a regex pattern for [language] that matches [pattern_description]. For the solution: 1. Show the final regex 2. Break it down visually — explain each part with an ASCII diagram 3. Provide 10 test cases (5 that should match, 5 that should NOT match) 4. Show edge cases and why they do or don't match 5. Provide the code to use it in [language] with named capture groups 6. Suggest a plain-English alternative if the regex is too complex for maintenance

Example output

Related prompts

Task automation script with retry logic and notificationsby @jess_python
Coding
Legacy JavaScript to modern ES2023 refactorby @marcus_react
Coding
Python dataclass to Pydantic v2 model converterby @jess_python
Coding
Custom React hook with TypeScript generics and full test suiteby @marcus_react
Coding