title: Removing a line from hosts file that contains name that starts with specific id
body: <p>Attempting to automate hosts file clean up and generation with multiple docker instances.</p>
  
  <p>Entries in hosts file will look like:</p>
  
  <pre><code>172.19.0.5 srs_develop_memcached-1_1 # docker-hosts.php
  172.19.0.8 srs_test_memcached-1_1 # docker-hosts.php
  </code></pre>
  
  <p>I was using <code>sed</code> to remove lines that end with <code># docker-hosts.php</code>.</p>
  
  <p>Now I need to be more specific and target the lines that end with <code># docker-hosts.php</code> and also have the instance name that starts with <code>srs_test</code> or <code>srs_develop</code>.</p>
  
  <p>What I started with was:</p>
  
  <pre><code>sed -i '/# docker-hosts.php\$/d' /etc/hosts
  </code></pre>
  
  <p>Now I need to be more specific, based on the docker instance I am working with.</p>