Regexpal
by @xueyetianya
Test and debug regex patterns against sample text. Use when checking match groups, validating patterns, generating replacements, linting syntax.
clawhub install regexpalπ About This Skill
name: RegexPal description: "Test and debug regex patterns against sample text. Use when checking match groups, validating patterns, generating replacements, linting syntax." version: "3.0.0" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["regex","regular-expression","pattern","matcher","tester","developer","text"] categories: ["Developer Tools", "Utility"]
RegexPal
A real regex tester and toolkit for the terminal. Test patterns against text, find matches in files with highlighted output, perform replacements, extract capturing groups, and get human-readable explanations of regex syntax.
Commands
| Command | Description |
|---------|-------------|
| regexpal test | Test if a regex matches text β reports full match, partial match, groups, and named groups |
| regexpal match | Find all matches in a file β highlights matches in red, shows line numbers and match count |
| regexpal replace | Replace all matches in a file and output to stdout. Supports backreferences (\1, \2) |
| regexpal extract | Extract capturing groups from all matches in a file β shows each group value per match |
| regexpal explain | Break down a regex pattern β lists character classes, groups, tokens, and quantifiers |
Requirements
python3 (uses re stdlib module)Examples
# Test a pattern
regexpal test '^\d{3}-\d{4}$' '123-4567'Find emails in a file
regexpal match '\w+@[\w.-]+' contacts.txtReplace version numbers
regexpal replace 'v(\d+)\.(\d+)' 'v\1.$((\\2+1))' changelog.mdExtract domain parts from emails
regexpal extract '(\w+)@(\w+\.\w+)' emails.txtUnderstand a complex pattern
regexpal explain '(?<=@)[\w.-]+'
π‘ Examples
# Test a pattern
regexpal test '^\d{3}-\d{4}$' '123-4567'Find emails in a file
regexpal match '\w+@[\w.-]+' contacts.txtReplace version numbers
regexpal replace 'v(\d+)\.(\d+)' 'v\1.$((\\2+1))' changelog.mdExtract domain parts from emails
regexpal extract '(\w+)@(\w+\.\w+)' emails.txtUnderstand a complex pattern
regexpal explain '(?<=@)[\w.-]+'