title: Using sed to replace entire phrase
body: <p>I'm using ShellScript to edit my bind dns configuration file, when add and remove zone references.
  Then in "master.conf" file we have this content:</p>
  
  <pre><code>...
  ...
  zone "mydomain.com" {
     type master; 
     file "/var/zones/m/mydomain.com"
  };
  ...
  ...
  </code></pre>
  
  <p>I want "remove" this entry to "mydomain.com" using "sed", but I could'n write a correct regex to this. The expression must use variable domain name and search until next close bracket and semicolon, something like this:</p>
  
  <pre><code>DOMAIN_NAME="mydomain.com"
  sed -i.bak -r 's/^zone "'$DOMAIN_NAME'" \{(.*)\};$//g' /var/zones/master.conf
  </code></pre>
  
  <p>See that we should ignore the content between brackets, and this chunk have to replaced with "nothing".
  I tried some variations of this expression, but without success.</p>