4 ms·
The "Conditions" as described on the "Samples" looks promising - looks like you can search for a pattern which is within X lines of another pattern. That's usef
by Albright 11y ago
The "Conditions" as described on the "Samples" looks promising - looks like you can search for a pattern which is within X lines of another pattern. That's useful for finding lines used only in certain contexts. AFAIK, there's no way to do that with ag.
https://sift-tool.org/samples https://sift-tool.org/samples
- mturmon 11y agoThe samples page you cite is helpful. The other two affordances that caught my attention on that page are (optional) multiline captures, e.g. for XML entities that might span lines, and the --replace modifier, which can transform a captured bit of text, simplifying the grep var= FILE | sed 's/var=\(.*\);/\1/' usage pattern.