title: Remove all words after starting from a specific word
body: <p>How do I remove all the words starting from COMMENT word in the following string?</p>
  
  <pre><code>echo "first_mail_sent_date_time datetime NOT NULL  COMMENT 'The date and time',"  |  sed 's/ COMMENT \w*/ /g'
  </code></pre>
  
  <p>The above sed command will remove only the word COMMENT. I need to remove everything after COMMENT but keep the last comma.</p>
  
  <p>I can use awk but I am looking for sed solution for consistency sake.</p>
  
  <pre><code>awk -F'COMMENT' '{print $1 ","}'
  </code></pre>