[0-9A-H\s]+); fully-qualified\s+#\s\S+\sE\d*\.\d*\s(?.+)@', $line, $matches); return empty($matches) ? null : $matches; } function normalizeEmojiName(string $emojiName): string { $rules = "'*' > asterisk ; '#' > number ; :: Any-Latin; :: NFD; :: [:Nonspacing Mark:] Remove; :: NFC; :: [^-[:^Punctuation:]] Remove; :: Upper(); [:^L:] { [-] > ; [-] } [:^L:] > ; [-[:Separator:]]+ > '_'; 1ST > FIRST ; 2ND > SECOND ; 3RD > THIRD ; "; return \Transliterator::createFromRules($rules)->transliterate($emojiName); } }