title: Rplace emoticons from a String,to String using java
body: <p>How to Remove the Emoticons from the String  My simple code is..</p>
  
  <pre><code>public static void main(String[] args) throws SQLException {
      String str="My nam is  ur -D ";
      getRefineCode(str);
  }
  
  private static void getRefineCode(String str) throws {
      List smstypeWord=getshortWord();
      for(int i=0;i&lt;smstypeWord.size();i++) {
          String string=smstypeWord.get(i).toString();
          String stringcon[]=string.split("_");
          String emessage=stringcon[0];
          String emoticon=stringcon[1].trim();
          if(str.contains(emoticon)) {
              str=str.replace(emoticon, emessage);
              System.out.println("=================&gt;"+str);
          }   
      }
      System.out.println("=======++==========&gt;"+str);
  }
  
  private static List getshortWord() throws SQLException {
      String query1 = "SELECT * FROM englishSmsText";
      PreparedStatement ps = conn.prepareStatement(query1);
      ResultSet rs = ps.executeQuery();
      String f_message="";
      String s_message="";
      while(rs.next()) {
          s_message=rs.getString("message");
          f_message=rs.getString("short_text");
          shortMessage.add(s_message+"_"+f_message);
          //fullMessage.add(f_message);
      }
      return shortMessage;
  }
  </code></pre>
  
  <p>My database is based on <a href="http://smsdictionary.co.uk/abbreviations" rel="nofollow">http://smsdictionary.co.uk/abbreviations</a> site</p>
  
  <p>I able to understand how to remove the multiple abb. or short message</p>
  
  <p>output is like My nam is  You are SquintLaughtGrinisappGaspoooh!!shockedintedr, Big SmilGrinisappGaspoooh!!shockedinted, Grin </p>