I have a big YAML file and I want to select an entire node using regex. For instance:
Node1:
Child:
GrandChild: foo
Node2:
AnotherChild:
AnotherGrandChild: bar
Node3:
LastChild:
LastGrandChild: foo
How can I use regex to select all of Node2 in the above example, and return:
Node2:
AnotherChild:
AnotherGrandChild: bar
As everything else in that node is indented (if I understand YAML right), this does work at least at your example string:
At least on my computer. Wanted to make a codepad demo, but it gives error. Will check the regex.
Full blown: