# Tool: Tạo Prompt Khớp Biểu Thức Chính Quy (Regex)

> Giải quyết các bài toán so khớp mẫu chuỗi phức tạp với Kiến trúc sư Prompt Regex BOP Prompts. Được tạo cho Lập trình viên Phần mềm và Chuyên viên Phân tích Dữ liệu, công cụ này thiết kế các prompt chỉ đạo mô hình AI viết, giải thích chi tiết và tối ưu hóa Regular Expression trên các engine JavaScript, Python và PCRE, đồng thời phòng tránh triệt để bẫy hiệu năng quay lui thảm họa (ReDoS).

**Category**: prompts-code-design | **Target AI Models**: Gemini 3.6 Flash, GPT-4o

## Domain Parameters:
- `regexFlavor` (select): Môi trường thực thi Regex (Default: "JavaScript")
- `preventReDoS` (toggle): Lá chắn chống lỗ hổng ReDoS (Default: "true")
- `includeTestVectors` (toggle): Tạo ma trận chuỗi kiểm thử (Test Vectors) (Default: "true")
- `activeFlags` (multiselect): Cờ Regex (Default: "g,i,m,u")

## Master Prompt Engineering Architecture (5 Pillars):
1. **Role & Persona**: Domain expert framing
2. **Task & Deliverable**: Primary objective & constraints
3. **Context & Parameters**: Technical specs & camera/stack parameters
4. **Negative Constraints**: Forbidden artifacts & bad practices
5. **Output Spec**: Section formatting & XML/Markdown structure

## Programmatic API Execution:
```http
POST /api/generate-prompt
Content-Type: application/json

{
  "toolSlug": "generate-prompt-for-regex-pattern-matching",
  "rawPrompt": "Your raw concept here",
  "thinkingLevel": "HIGH"
}
```
