title: Removing matching text from line
body: <p>I have a example cut down from a log file.</p>
  
  <pre><code>112 172.172.172.1#50912 (ssl.bing.com):
  </code></pre>
  
  <p>I would like some how to remove the # and numbers after and (): from the url.</p>
  
  <p>Would like the result.</p>
  
  <pre><code>112 172.172.172.1 ssl.bing.com
  </code></pre>
  
  <p>Here is the sed oneliner I have been working on.</p>
  
  <pre><code>cat newdns.log | sed -e 's/.*query: //' | cut -f 1 -d' ' | sort | uniq -c | sort -k2 &gt; old.log
  </code></pre>
  
  <p>Thanks</p>