Re:Greppability is an underrated code metric
by nickcox on Tuesday September 03, 2024 @06:50PM
(#41440117)
ast-grep supports regex [1] or pattern based [2] matching and replacement.
[1] https://ast-grep.github.io/guide/rule-config/atomic-rule.htm... [2] https://ast-grep.github.io/guide/rule-config/atomic-rule.htm...
Something that lets me say that I want to replace “Dog\(.*\)” with “Wolf\1”, but where each substitution is performed only within single “symbols” as identified by TS or LSP.