Hi I am trying to build a multiline regex to group a line followed by lines beginning with at least one white space. For example
interface Ethernet 1/1
ip address <>
mtu <>
ip tcp path-mtu-discovery
router bgp 100
network 1.1.1.0
How to build a regex that would group "interface ethertnet 1/1" and its subconfig into one group, and "ip tcp path-mtu-discovery" into another group and the bgp and it's subcommands into another group. In other words, a line beginning with non-whitespace character should get grouped with, if it is followed by, lines beginning with whitespaces. Two lines beginning with non-whitespace character should be two different groups.
I tried some of the regex already discussed, but that doesn't help.
Thanks in advance