-1

I'm new to react-native, I want to analyze my text in the following criteria

I have my string like this
happy Morning Tuesday 😜✌ðŸ», Today I'm had my breakfast

In this string this one is emoji Unicode character😜✌ðŸ».I want to do the following analysis

  1. Total number of emojis,
  2. count number of times used for every emoji

Can you help me, I want to do in react native, can you suggest any packages or any references for me

aminography
  • 21,986
  • 13
  • 70
  • 74
Rajendran bala
  • 87
  • 1
  • 11

1 Answers1

1

Try the following library

if you dont want to use any third party library try

function getEmojiChars(text) {

console.log(text.match(/\ud83c[\udf00-\udfff]|\ud83d[\udc00-\ude4f]|\ud83d[\ude80-\udeff]/g))  ;
}

also refer the following link