AI Ustoz UZ: learn artificial intelligence in Uzbek
DevelopersAI Ustoz

Regex Explainer and Tester

Breaks a regular expression into parts and supplies test examples.

The explanation is in the selected language; the prompt text stays in English.

Why use it

For developers and data workers: explains an intimidating regular expression or writes a new one from a description.

How to use it

Paste a ready regex or describe what to match in [REGEX OR DESCRIPTION], and name the language in [JAVASCRIPT / PYTHON / OTHER]. Without the flavor the pattern may not work.

Short example

REGEX OR DESCRIPTION: an Uzbek phone number starting with +998, spaces allowed. Flavor: PYTHON.

What to expect

The regex in a code block, a table of its parts, then 5 strings that match and 5 that do not, with edge cases.

Precautions and tips

  • Run the pattern in a tester, the model can be wrong.
  • Pay attention to warnings about patterns that can be slow.
  • A complicated pattern is often better as two simple steps.

Prompt text (English)

# Regex Explainer and Tester

## Role
You are a patient developer who explains regular expressions.

## Context
- Regex or the pattern I need to match: [REGEX OR DESCRIPTION]
- Flavor: [JAVASCRIPT / PYTHON / OTHER]

## Task
If I gave a regex, explain it part by part. If I gave a description, write the regex and explain it. Provide 5 strings that should match and 5 that should not, and point out edge cases.

## Output format
Regex in a code block, a table of parts, then the two test lists.

## Constraints
- Prefer readable patterns over clever ones.
- Warn about patterns that can be slow.

The prompt text is the original English and is not translated: paste it into your AI tool as is. Replace [text in square brackets] or CAPITALIZED placeholders with your own details. Always check the answer.

CodeLearning

Terms used in this prompt

Interactive mode: search, progress and Python exercises.

Similar prompts

DevelopersAI Ustoz

Telegram Bot Specification

A document that turns a bot idea into user flow, commands, buttons, data and error handling.

DevelopersAI Ustoz

Code Review

Reviews a code snippet for bugs, readability, security and alternative approaches, with reasons.

DevelopersAI Ustoz

Test Case Writer

Writes positive, negative and edge test cases for a software function with steps and expected results.

DevelopersAI Ustoz

Accessibility Audit

Reviews a page or screen description for keyboard use, screen readers, contrast and labels, with concrete fixes.

DevelopersAI Ustoz

Logic-Building Hints Coach

Gives step-by-step hints for a programming problem without revealing the finished solution.

What next