title: Ignore specific patterns in line using sed
body: <p>I'm trying to grep the word which starts with <code>group</code> keyword &amp; ends with <code>-wx</code> in the given line. Also I need to ignore the below words.</p>
  
  <ol>
  <li>Starts with <code>default:group</code> and ends with <code>-wx</code></li>
  <li><code>group::-wx</code></li>
  </ol>
  
  <p>My Findings</p>
  
  <pre><code>echo "# file: /test/test123 # owner: own # group: acct user::r--  group::r-x mask::rwx other::r-x default:user::r-- default:user:an:--x default:group::r-x default:group:fin:-wx default:mask::rwx default:other::r-x" | grep -o "group:[^ ]*-wx" | sed '/group::-wx/d';'/default:[^ ]*:[^ ]*-wx/d'
  </code></pre>
  
  <p>Actual result</p>
  
  <pre><code>fin:-wx
  </code></pre>
  
  <p>Expected result</p>
  
  <pre><code>&lt;null&gt;
  </code></pre>