Home > Backend Development > Golang > How Can I Use Regex to Match All Emojis in a String?

How Can I Use Regex to Match All Emojis in a String?

Susan Sarandon
Release: 2024-11-28 14:27:11
Original
930 people have browsed it

How Can I Use Regex to Match All Emojis in a String?

To match all emojis in a string using regex, you can use the given regular expression:

[\x{1F600}-\x{1F64F}]|[\x{1F680}-\x{1F6FF}]|[\x{2600}-\x{26FF}]|[\x{2700}-\x{27BF}]|[\x{1F1E6}-\x{1F1FF}]|[\x{1F201}-\x{1F202}]|[\x{1F21A}-\x{1F22F}]|[\x{1F232}-\x{1F23A}]|[\x{1F250}-\x{1F251}]|[\x{1F300}-\x{1F320}]|[\x{1F32D}-\x{1F335}]|[\x{1F337}-\x{1F37C}]|[\x{1F37E}-\x{1F393}]|[\x{1F3A0}-\x{1F3C1}]|[\x{1F3C3}-\x{1F3CE}]|[\x{1F3D4}-\x{1F3DF}]|[\x{1F3E0}-\x{1F3F0}]|[\x{1F3F3}-\x{1F3F5}]|[\x{1F3F7}-\x{1F3FA}]|[\x{1F400}-\x{1F407}]|[\x{1F409}-\x{1F414}]|[\x{1F416}-\x{1F43A}]|[\x{1F43C}-\x{1F43E}]|[\x{1F440}]|[\x{1F442}-\x{1F4F9}]|[\x{1F4FB}-\x{1F53D}]|[\x{1F549}-\x{1F54E}]|[\x{1F550}-\x{1F567}]|[\x{1F56F}-\x{1F579}]|[\x{1F57B}-\x{1F5A3}]|[\x{1F5A5}-\x{1F5FF}]|[\x{1F600}-\x{1F64F}]|[\x{1F680}-\x{1F6FF}]|[\x{1F7E0}-\x{1F7EB}]|[\x{1F90C}-\x{1F93A}]|[\x{1F93C}-\x{1F945}]|[\x{1F947}-\x{1F970}]|[\x{1F973}-\x{1F976}]|[\x{1F97A}-\x{1F9A2}]|[\x{1F9B0}-\x{1F9B9}]|[\x{1F9C0}-\x{1F9C2}]|[\x{1F9D1}-\x{1F9FF}]
Copy after login

The above is the detailed content of How Can I Use Regex to Match All Emojis in a String?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template