The ⚓️ emoji is a sequence of two Unicode code points: \x{2693}\x{FE0F}. You can test it and see that \x{2693}\x{FE0F} regex matches⚓️.
When you place the \x{2693}\x{FE0F} into a character class, you find a match in both ⛲️ (=\x{26F2}\x{FE0F}) and ⚓️ since both contain at least one of the Unicode code points.
As a workaround, place the emojis into a non-capturing group rather than a character class, e.g. (?:⚓️|[a-z0-9]) will match a ⚓️ or a lowercase ASCII letter/digit.
The
⚓️emoji is a sequence of two Unicode code points:\x{2693}\x{FE0F}. You can test it and see that\x{2693}\x{FE0F}regex matches⚓️.When you place the
\x{2693}\x{FE0F}into a character class, you find a match in both⛲️(=\x{26F2}\x{FE0F}) and⚓️since both contain at least one of the Unicode code points.As a workaround, place the emojis into a non-capturing group rather than a character class, e.g.
(?:⚓️|[a-z0-9])will match a⚓️or a lowercase ASCII letter/digit.