title: Filtering out emoticons using sed
body: <p>I have a grep expression using cygwin grep on Win.</p>
  
  <pre><code>grep -a "\\,,/\|\\m/\|\\m/\\&gt;\.&lt;/\\m/\|:u" all_fbs.txt &gt; rockon_fbs.txt
  </code></pre>
  
  <p>Once I identify the emoticon class, however, I want to strip them out of the data. However, the same regexp above within a sed results in a syntax error (yes, I realize I could use /d instead of //g, but this doesn't make a difference, I still get the error.)</p>
  
  <pre><code>sed "s/\(\\,,/\|\\m/\|\\m/\\&gt;\.&lt;/\\m/\|:u\)*//g"
  </code></pre>
  
  <p>The full line is:</p>
  
  <pre><code>grep -a "\\,,/\|\\m/\|\\m/\\&gt;\.&lt;/\\m/\|:u" all_fbs.txt | sed "s/\(\\,,/\|\\m/\|\\m/\\&gt;\.&lt;/\\m/\|:u\)*//g" | sed "s/^/ROCKON\t/" &gt; rockon_fbs.txt
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>sed: -e expression #1, char 14: unknown option to `s'
  </code></pre>
  
  <p>I know it's coming from the sed regexp I'm asking about it b/c if I remove that portion of the full line, then I get no error (but, of course, the emoticons are not filtered out).</p>
  
  <p>Thanks in advance,</p>
  
  <p>Steve</p>