Home  >  Q&A  >  body text

javascript - js filtering emoticons of WeChat nicknames

WeChat nickname:

1.最多显示8位中文字符/16位英文字符,超出部分用“...”代替,
2.对于无法识别的表情等特殊字符,用“口”代替

Now I encounter an emoticon that cannot be recognized, and I want to filter it into "mouth"; is there anyone who can teach me how to write this js and regular expression

曾经蜡笔没有小新曾经蜡笔没有小新2712 days ago1298

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-05-18 10:53:12

    How to find UTF-8 encoded emoticons in JS

    reply
    0
  • 迷茫

    迷茫2017-05-18 10:53:12

    Let me tell you my solution first:

    // Example name:
    var str = "Abc

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-18 10:53:12

    Bold text Please help. Have you done this?

    reply
    0
  • Cancelreply