Skip to content

some variations of emojis are not working with current version of emoji-regex library  #108

Open
@forebitt

Description

@forebitt

I'm trying to build an input which only accepts alphanumeric and emoji characters. This is my implementation:

import emojiRegex from "emoji-regex";

const isValidInput = (input: string) => {
        const emojisPattern = emojiRegex();
        const alphanumPattern = /^[a-zA-Z0-9\s]+(\.app)?$/;
        const withoutEmojis = input.replace(emojisPattern, "e");
        return alphanumPattern.test(withoutEmojis);
      };

this is the emoji "🧑🏼‍❤️‍🧑🏼" I'm trying to parse, the library is supporting all other variation of this emoji, except this variation. Is there a way to fix it?
https://emojipedia.org/couple-with-heart-person-person-light-skin-tone-medium-skin-tone/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions