title
title copied to clipboard
Refactor regex in index.ts for improved readability
The main regex in src/index.ts is functionally correct but difficult to read and understand. This affects maintainability and onboarding of new contributors.
Suggested Fix
Extract named parts (e.g., word matcher, boundary matcher) into constants and add inline comments for each group.
Goal
- Preserve exact functionality
- Improve readability