As you all know emoji symbols are coded up to 3 or 4 bytes, so it may occupy 2 symbols in my string. For example \'
not including all emojis like :
For fun : Solution to remove special characters without using regexp
const str = "abcdefgehijkz Раз, два три! 1234567809 -ab A Z & é è Ö â
To remove all possible emojis:
new RegExp('[\u1000-\uFFFF]+', 'g');