• I’ve been reading through tons of suggestions of how to remove emojis, however when applied to a WordPress title, I can’t seem to get it to strip out the emojis, an example of an emoji hex code from the source code I’m having issues with ‘??’ 😁 I’m attempting to remove these from title saved as a variable access the hashtags which I’ve got working, however it’s pulling the emoji out along with the hashtags which is what’s causing me issues, any tips on removing this style of Emoji would be greatly appreciated. thanks

    code example &#x1f601

    Ideally, I’d be looking to exclude all emojis from a variable is possible

    • This topic was modified 4 years, 3 months ago by jduffell.
Viewing 1 replies (of 1 total)
  • Dion

    (@diondesigns)

    Not tested, but the following PHP code would appear to be what you want:

    $text = preg_replace('/\&#x1f[a-f0-9]{3};/s', '', $text);

Viewing 1 replies (of 1 total)
  • The topic ‘Removing Emojis from a string’ is closed to new replies.