While implementing T3523 I noticed that the current implementation of the vyos.frr class lacks support for "finding a line" inside a section.
Imaging the following FRR configuration:
! vrf red ip protocol bgp route-map foo-map-in exit-vrf ! vrf green ip protocol bgp route-map foo-map-in exit-vrf ! vrf blue ip protocol bgp route-map foo-map-in exit-vrf !
Now if we wan't to remove the ip protocol bgp route-map from vrf blue this is not possible, as when using a regex for frr_cfg.modify_section(r'(\s+)?ip protocol bgp route-map [-a-zA-Z0-9.]+$', '', '(\s|!)') this will match for all VRFs.