Using KM 9.0.6
The "Get Substring" action is not multibyte emoji aware. Some emoji (e.g. ) match as a single character, many others match as 2 characters, and some of the newer ones with combining forms (commonly used for skin tone variants like ) require 4 characters to match.
For example, with the single-emoji string value "", asking for the subscription to the first character returns nothing, asking for the first 2 characters returns "" (the generic form of the OK hand gesture), and you have to ask for the first 4 characters to return "".
I realize this may well be a very difficult bug to fix (Unicode...), but it definitely feels like a bug. No matter how complex the internal string encoding for Unicode is, "" conceptually is one character.
Regular expression matching is better but still falls down on the complex combining form emoji. Ideally I would expect .
to match any emoji as a single character, but it matches most, it still fails to match something like "", instead matching only the first 2 bytes, returning "" if you save a substring match.
I've attached an example macro below to illustrate this.
Emoji Substring Test.kmmacros (2.5 KB)