regex - Nim regex matching and replacement
Covers Nim's std/re, std/nre, and nim-regex APIs for pattern matching, captures, replacement, splitting, and linear-time matching.
Tags
Updated: 2026-10-04Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Create regex patterns
- Match strings and captures
- Find substring matches
- Iterate over matches
- Replace matched text
- Split strings by patterns
- Check pattern containment
- Access capture bounds
- Use linear-time matching
Inputs
- Nim source code
- Input strings
- Regex patterns
- Regex flags
- Replacement strings or procedures
Outputs
- Match results
- Captured groups
- Match positions
- Replaced strings
- Split string sequences
Requirements
- Nim environment
- PCRE for std/re or std/nre
- nim-regex for pure Nim matching
