Debug and fix regular expressions that don't match as expected
Help me debug my regular expression that's not working correctly.
**Programming Language:** {{LANGUAGE}}
**Current regex pattern:** `{{REGEX}}`
**Regex flags:** {{FLAGS}}
**Test strings that SHOULD match:**
```
{{SHOULD_MATCH}}
```
**Test strings that should NOT match:**
```
{{SHOULD_NOT_MATCH}}
```
**Current results I'm getting:** {{CURRENT_RESULTS}}
**What I want to capture:** {{CAPTURE_GROUPS}}
Please provide:
1. **Pattern Analysis**: Break down what the current regex matches
2. **Issue Identification**: Explain why it's not matching as expected
3. **Fixed Regex**: Provide the corrected pattern
4. **Pattern Explanation**: Step-by-step explanation of the fixed regex
5. **Capture Groups**: Explain what each group captures
6. **Edge Cases**: Test cases for edge cases
7. **Performance Check**: Identify potential catastrophic backtracking
8. **Language-Specific Notes**: Any language-specific regex quirksOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{REGEX][{FLAGS][{SHOULD_MATCH][{SHOULD_NOT_MATCH][{CURRENT_RESULTS][{CAPTURE_GROUPS]