Reference
Regex Reference
A concise reference for developer text workflows.
Pattern matching versus transformation
A regular expression describes text patterns. It can help identify lines or regions, but a safe transformation still requires an explicit decision about what should change.
Useful concepts
- Line anchors identify positions at line boundaries when multiline semantics are enabled.
- Whitespace classes match whitespace in many regex engines, but exact semantics vary.
- Capturing groups can preserve pieces of text while replacing matched regions.
Do not overgeneralize
Regex is not automatically the right tool for every cleanup job. For simple whole-line operations, explicit line processing is often easier to reason about and test.