I have a string like this:
zone "example.com" {
type slave;
file "db.example.com";
masters { x.x.x.x; };
};
zone "foo.com" {
type slave;
file "db.foo.com";
masters { x.x.x.x; };
};
...
I would like to delete a specific zone.
I know how to delete it once I have the regex:
sudo sed -i '$REGEX' /file/path
But I am not quite sure of the regex itself. I know the beginning would be (zone "example.com" {) and the end would be something like (};\s};) but how do i also include the content in between?