Vim regex grouping
Posted on Tue 28 July 2020 in dev-journal • Tagged with developer journal, vim
Wrote a regex in vim today that used a grouping in the find and replace. Needed to update 936 instances..
From a statement that calls a custom module function
{% if entry.getEnableVal('conveyorDevToggle') == 1
to be a
simple statement.. {% if entry.conveyorDevToggle %}
This is the regex used:
:%s/\ventry.getEnableVal …
Continue reading