我正在尝试对包含多个非 ASCII 字符的令牌列表进行 grep。我只想匹配表情符号,其他字符如 ð 或 ñ 都可以。表情符号的 unicode 范围似乎是 U+1F600-U+1F1FF 但当我使用 grep 搜索它时,会发生这种情况:
grep -P "[\x1F6-\x1F1]" contact_names.tokens
grep: range out of order in character class
Run Code Online (Sandbox Code Playgroud)
https://unicode.org/emoji/charts/full-emoji-list.html#1f3f4_e0067_e0062_e0077_e006c_e0073_e007f