title: removing characters of a specific unicode range from a string
body: <p>I have a program that is parsting tweets in real time from the twitter stream api. Before storing them, I am encoding them as utf8. Certain characters end up appearing in the string as ?, ??, or ??? instead of their respective unicode codes and cause problems. Upon further investigation, I found that the problematic characters are from the <a href="http://www.fileformat.info/info/unicode/block/emoticons/index.htm" rel="noreferrer">"emoticon" block</a>, U+1F600 - U+1F64F, and the "Miscellaneous <a href="http://www.fileformat.info/info/unicode/block/miscellaneous_symbols_and_pictographs/index.htm" rel="noreferrer">Symbols And Pictographs" block</a>, U+1F300 - U+1F5FF. I tried removing, but was unsuccessful as the matcher ended up replacing almost every character in the string, not just my desired unicode range.</p>
  
  <pre><code>String utf8tweet = "";
          try {
              byte[] utf8Bytes = status.getText().getBytes("UTF-8");
  
              utf8tweet = new String(utf8Bytes, "UTF-8");
  
          } 
          catch (UnsupportedEncodingException e) {
              e.printStackTrace();
          }
  Pattern unicodeOutliers = Pattern.compile("[\\u1f300-\\u1f64f]", Pattern.UNICODE_CASE | Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE);
  Matcher unicodeOutlierMatcher = unicodeOutliers.matcher(utf8tweet);
  utf8tweet = unicodeOutlierMatcher.replaceAll(" ");
  </code></pre>
  
  <p>What can I do to remove these characters?</p>