title: Removing unicode from string
body: <p>I have the following PHP string:</p>
  
  <pre><code>\ud83c\udf38Owner IG: deidarasss\n\ud83c\udf38free ongkir BANDA ACEH dan LHOKSEUMAWE\n\u27a1 testimoni: #testydfs\n\ud83d\udcf1LINE: darafitris\nsold=delete\nCLOSE  \ud83d\ude0d\ud83d\ude03
  </code></pre>
  
  <p>I wanted to strip out all the unicode from this string, how can I do so?</p>
  
  <p>I have tried to do the following:</p>
  
  <pre><code> private static function removeEmoji($text) {
          $clean_text = "";
  
          // Match Emoticons
          $regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
          $clean_text = preg_replace($regexEmoticons, '', $text);
  
          // Match Miscellaneous Symbols and Pictographs
          $regexSymbols = '/[\x{1F300}-\x{1F5FF}]/u';
          $clean_text = preg_replace($regexSymbols, '', $clean_text);
  
          // Match Transport And Map Symbols
          $regexTransport = '/[\x{1F680}-\x{1F6FF}]/u';
          $clean_text = preg_replace($regexTransport, '', $clean_text);
  
          // Match Miscellaneous Symbols
          $regexMisc = '/[\x{2600}-\x{26FF}]/u';
          $clean_text = preg_replace($regexMisc, '', $clean_text);
  
          // Match Dingbats
          $regexDingbats = '/[\x{2700}-\x{27BF}]/u';
          $clean_text = preg_replace($regexDingbats, '', $clean_text);
  
          return $clean_text;
      }
  </code></pre>
  
  <p>but it doesn't really help</p>