title: How do I remove emoji characters from a string?
body: <p>I've got a text input from a mobile device. It contains emoji. In C#, I have the text as</p>
  
  <pre><code>Text  text
  </code></pre>
  
  <p>Simply put, I want the output text to be </p>
  
  <pre><code>Text text
  </code></pre>
  
  <hr>
  
  <p>I'm trying to just remove all such emojis from the text with rejex.. except, I'm not sure how to convert that emoji into it's unicode sequence.. 
  How do I do that? </p>
  
  <p>edit: </p>
  
  <p>I'm trying to save the user input into mysql. It looks like mysql UTF8 doesn't really support unicode characters and the <a href="https://stackoverflow.com/questions/8709892/mysql-throws-incorrect-string-value-error">right way to do it would be by changing the schema</a> but I don't think that is an option for me. So I'm trying to just remove all the emoji characters before saving it in the database.</p>
  
  <p>This is my schema for the relevant column: </p>
  
  <p><img src="https://i.stack.imgur.com/DW2ok.jpg" alt="enter image description here"></p>
  
  <p>I'm using Nhibernate as my ORM and the insert query generated looks like this: </p>
  
  <pre><code>Insert into `Content` (ContentTypeId, Comments, DateCreated) 
  values (?p0, ?p1, ?p2);
  ?p0 = 4 [Type: Int32 (0)]. ?p1 = 'Text  text' [Type: String (20)], ?p2 = 19/01/2015 10:38:23 [Type: DateTime (0)]
  </code></pre>
  
  <p>When I copy this query from logs and run it on mysql directly, I get this error: </p>
  
  <pre><code>1 warning(s): 1366 Incorrect string value: '\xF0\x9F\x98\x80 t...' for column 'Comments' at row 1   0.000 sec
  </code></pre>
  
  <hr>
  
  <p>Also, I've tried to  convert it into encoding bytes and it doesn't really work.. </p>
  
  <p><img src="https://i.stack.imgur.com/lPbiq.png" alt="enter image description here"></p>