How to replace emoji characters in string using regex in golang
Asked Answered
A

2

6

I want to replace all of emoji s in string by regex in golang.

Like this :

Thats a nice joke ๐Ÿ˜†๐Ÿ˜†๐Ÿ˜† ๐Ÿ˜› -> Thats a nice joke [e][e][e] [e]

Alkalize answered 19/9, 2016 at 14:35 Comment(2)
What kind of emojis are you looking to support? Do you know the Unicode range? Try this one โ€“ Maurya
@WiktorStribiลผew special thx. that was what i want, โ€“ Alkalize
I
8

You seem to want to match a specific set of emojis.

Use

package main

import (
    "fmt"
    "regexp"
)

func main() {
    var emojiRx = regexp.MustCompile(`[\x{1F600}-\x{1F6FF}|[\x{2600}-\x{26FF}]`)
    var s = emojiRx.ReplaceAllString("Thats a nice joke ๐Ÿ˜†๐Ÿ˜†๐Ÿ˜† ๐Ÿ˜›", `[e]`)
    fmt.Println(s)    
}

See the Go demo.

Note that:

  • [\x{1F600}-\x{1F64F}] - matches smilies
  • [\x{1F680}-\x{1F6FF}] - matches transport emojis, etc.

A regex to match all emojis listed in the Emoji 14.0 Standard you can use

emojiRx := regexp.MustCompile(`[#*0-9]\x{FE0F}?\x{20E3}|ยฉ\x{FE0F}?|[ยฎ\x{203C}\x{2049}\x{2122}\x{2139}\x{2194}-\x{2199}\x{21A9}\x{21AA}]\x{FE0F}?|[\x{231A}\x{231B}]|[\x{2328}\x{23CF}]\x{FE0F}?|[\x{23E9}-\x{23EC}]|[\x{23ED}-\x{23EF}]\x{FE0F}?|\x{23F0}|[\x{23F1}\x{23F2}]\x{FE0F}?|\x{23F3}|[\x{23F8}-\x{23FA}\x{24C2}\x{25AA}\x{25AB}\x{25B6}\x{25C0}\x{25FB}\x{25FC}]\x{FE0F}?|[\x{25FD}\x{25FE}]|[\x{2600}-\x{2604}\x{260E}\x{2611}]\x{FE0F}?|[\x{2614}\x{2615}]|\x{2618}\x{FE0F}?|\x{261D}[\x{FE0F}\x{1F3FB}-\x{1F3FF}]?|[\x{2620}\x{2622}\x{2623}\x{2626}\x{262A}\x{262E}\x{262F}\x{2638}-\x{263A}\x{2640}\x{2642}]\x{FE0F}?|[\x{2648}-\x{2653}]|[\x{265F}\x{2660}\x{2663}\x{2665}\x{2666}\x{2668}\x{267B}\x{267E}]\x{FE0F}?|\x{267F}|\x{2692}\x{FE0F}?|\x{2693}|[\x{2694}-\x{2697}\x{2699}\x{269B}\x{269C}\x{26A0}]\x{FE0F}?|\x{26A1}|\x{26A7}\x{FE0F}?|[\x{26AA}\x{26AB}]|[\x{26B0}\x{26B1}]\x{FE0F}?|[\x{26BD}\x{26BE}\x{26C4}\x{26C5}]|\x{26C8}\x{FE0F}?|\x{26CE}|[\x{26CF}\x{26D1}\x{26D3}]\x{FE0F}?|\x{26D4}|\x{26E9}\x{FE0F}?|\x{26EA}|[\x{26F0}\x{26F1}]\x{FE0F}?|[\x{26F2}\x{26F3}]|\x{26F4}\x{FE0F}?|\x{26F5}|[\x{26F7}\x{26F8}]\x{FE0F}?|\x{26F9}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{FE0F}\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{26FA}\x{26FD}]|\x{2702}\x{FE0F}?|\x{2705}|[\x{2708}\x{2709}]\x{FE0F}?|[\x{270A}\x{270B}][\x{1F3FB}-\x{1F3FF}]?|[\x{270C}\x{270D}][\x{FE0F}\x{1F3FB}-\x{1F3FF}]?|\x{270F}\x{FE0F}?|[\x{2712}\x{2714}\x{2716}\x{271D}\x{2721}]\x{FE0F}?|\x{2728}|[\x{2733}\x{2734}\x{2744}\x{2747}]\x{FE0F}?|[\x{274C}\x{274E}\x{2753}-\x{2755}\x{2757}]|\x{2763}\x{FE0F}?|\x{2764}(?:\x{200D}[\x{1F525}\x{1FA79}]|\x{FE0F}(?:\x{200D}[\x{1F525}\x{1FA79}])?)?|[\x{2795}-\x{2797}]|\x{27A1}\x{FE0F}?|[\x{27B0}\x{27BF}]|[\x{2934}\x{2935}\x{2B05}-\x{2B07}]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}\x{FE0F}?|[\x{1F21A}\x{1F22F}\x{1F232}-\x{1F236}]|\x{1F237}\x{FE0F}?|[\x{1F238}-\x{1F23A}\x{1F250}\x{1F251}\x{1F300}-\x{1F320}]|[\x{1F321}\x{1F324}-\x{1F32C}]\x{FE0F}?|[\x{1F32D}-\x{1F335}]|\x{1F336}\x{FE0F}?|[\x{1F337}-\x{1F37C}]|\x{1F37D}\x{FE0F}?|[\x{1F37E}-\x{1F384}]|\x{1F385}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F386}-\x{1F393}]|[\x{1F396}\x{1F397}\x{1F399}-\x{1F39B}\x{1F39E}\x{1F39F}]\x{FE0F}?|[\x{1F3A0}-\x{1F3C1}]|\x{1F3C2}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F3C3}\x{1F3C4}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F3C5}\x{1F3C6}]|\x{1F3C7}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F3C8}\x{1F3C9}]|\x{1F3CA}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F3CB}\x{1F3CC}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{FE0F}\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F3CD}\x{1F3CE}]\x{FE0F}?|[\x{1F3CF}-\x{1F3D3}]|[\x{1F3D4}-\x{1F3DF}]\x{FE0F}?|[\x{1F3E0}-\x{1F3F0}]|\x{1F3F3}(?:\x{200D}(?:\x{26A7}\x{FE0F}?|\x{1F308})|\x{FE0F}(?:\x{200D}(?:\x{26A7}\x{FE0F}?|\x{1F308}))?)?|\x{1F3F4}(?:\x{200D}\x{2620}\x{FE0F}?|\x{E0067}\x{E0062}(?:\x{E0065}\x{E006E}\x{E0067}|\x{E0073}\x{E0063}\x{E0074}|\x{E0077}\x{E006C}\x{E0073})\x{E007F})?|[\x{1F3F5}\x{1F3F7}]\x{FE0F}?|[\x{1F3F8}-\x{1F407}]|\x{1F408}(?:\x{200D}\x{2B1B})?|[\x{1F409}-\x{1F414}]|\x{1F415}(?:\x{200D}\x{1F9BA})?|[\x{1F416}-\x{1F43A}]|\x{1F43B}(?:\x{200D}\x{2744}\x{FE0F}?)?|[\x{1F43C}-\x{1F43E}]|\x{1F43F}\x{FE0F}?|\x{1F440}|\x{1F441}(?:\x{200D}\x{1F5E8}\x{FE0F}?|\x{FE0F}(?:\x{200D}\x{1F5E8}\x{FE0F}?)?)?|[\x{1F442}\x{1F443}][\x{1F3FB}-\x{1F3FF}]?|[\x{1F444}\x{1F445}]|[\x{1F446}-\x{1F450}][\x{1F3FB}-\x{1F3FF}]?|[\x{1F451}-\x{1F465}]|[\x{1F466}\x{1F467}][\x{1F3FB}-\x{1F3FF}]?|\x{1F468}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}]|\x{1F466}(?:\x{200D}\x{1F466})?|\x{1F467}(?:\x{200D}[\x{1F466}\x{1F467}])?|[\x{1F468}\x{1F469}]\x{200D}(?:\x{1F466}(?:\x{200D}\x{1F466})?|\x{1F467}(?:\x{200D}[\x{1F466}\x{1F467}])?)|[\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}])|\x{1F3FB}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}[\x{1F3FB}-\x{1F3FF}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F468}[\x{1F3FC}-\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FC}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}[\x{1F3FB}-\x{1F3FF}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F468}[\x{1F3FB}\x{1F3FD}-\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FD}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}[\x{1F3FB}-\x{1F3FF}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F468}[\x{1F3FB}\x{1F3FC}\x{1F3FE}\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FE}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}[\x{1F3FB}-\x{1F3FF}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F468}[\x{1F3FB}-\x{1F3FD}\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FF}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?\x{1F468}[\x{1F3FB}-\x{1F3FF}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F468}[\x{1F3FB}-\x{1F3FE}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?)?|\x{1F469}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D})?[\x{1F468}\x{1F469}]|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}]|\x{1F466}(?:\x{200D}\x{1F466})?|\x{1F467}(?:\x{200D}[\x{1F466}\x{1F467}])?|\x{1F469}\x{200D}(?:\x{1F466}(?:\x{200D}\x{1F466})?|\x{1F467}(?:\x{200D}[\x{1F466}\x{1F467}])?)|[\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}])|\x{1F3FB}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}]|\x{1F48B}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}])|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FC}-\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FC}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}]|\x{1F48B}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}])|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}\x{1F3FD}-\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FD}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}]|\x{1F48B}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}])|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}\x{1F3FC}\x{1F3FE}\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FE}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}]|\x{1F48B}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}])|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FD}\x{1F3FF}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?|\x{1F3FF}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}]|\x{1F48B}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FF}])|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}[\x{1F468}\x{1F469}][\x{1F3FB}-\x{1F3FE}]|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}]))?)?|\x{1F46A}|[\x{1F46B}-\x{1F46D}][\x{1F3FB}-\x{1F3FF}]?|\x{1F46E}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F46F}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?|[\x{1F470}\x{1F471}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F472}[\x{1F3FB}-\x{1F3FF}]?|\x{1F473}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F474}-\x{1F476}][\x{1F3FB}-\x{1F3FF}]?|\x{1F477}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F478}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F479}-\x{1F47B}]|\x{1F47C}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F47D}-\x{1F480}]|[\x{1F481}\x{1F482}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F483}[\x{1F3FB}-\x{1F3FF}]?|\x{1F484}|\x{1F485}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F486}\x{1F487}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F488}-\x{1F48E}]|\x{1F48F}[\x{1F3FB}-\x{1F3FF}]?|\x{1F490}|\x{1F491}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F492}-\x{1F4A9}]|\x{1F4AA}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F4AB}-\x{1F4FC}]|\x{1F4FD}\x{FE0F}?|[\x{1F4FF}-\x{1F53D}]|[\x{1F549}\x{1F54A}]\x{FE0F}?|[\x{1F54B}-\x{1F54E}\x{1F550}-\x{1F567}]|[\x{1F56F}\x{1F570}\x{1F573}]\x{FE0F}?|\x{1F574}[\x{FE0F}\x{1F3FB}-\x{1F3FF}]?|\x{1F575}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{FE0F}\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F576}-\x{1F579}]\x{FE0F}?|\x{1F57A}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F587}\x{1F58A}-\x{1F58D}]\x{FE0F}?|\x{1F590}[\x{FE0F}\x{1F3FB}-\x{1F3FF}]?|[\x{1F595}\x{1F596}][\x{1F3FB}-\x{1F3FF}]?|\x{1F5A4}|[\x{1F5A5}\x{1F5A8}\x{1F5B1}\x{1F5B2}\x{1F5BC}\x{1F5C2}-\x{1F5C4}\x{1F5D1}-\x{1F5D3}\x{1F5DC}-\x{1F5DE}\x{1F5E1}\x{1F5E3}\x{1F5E8}\x{1F5EF}\x{1F5F3}\x{1F5FA}]\x{FE0F}?|[\x{1F5FB}-\x{1F62D}]|\x{1F62E}(?:\x{200D}\x{1F4A8})?|[\x{1F62F}-\x{1F634}]|\x{1F635}(?:\x{200D}\x{1F4AB})?|\x{1F636}(?:\x{200D}\x{1F32B}\x{FE0F}?)?|[\x{1F637}-\x{1F644}]|[\x{1F645}-\x{1F647}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F648}-\x{1F64A}]|\x{1F64B}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F64C}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F64D}\x{1F64E}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F64F}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F680}-\x{1F6A2}]|\x{1F6A3}(?:\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-\x{1F939}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F93A}|\x{1F93C}(?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?|[\x{1F93D}\x{1F93E}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|[\x{1F93F}-\x{1F945}\x{1F947}-\x{1F976}]|\x{1F977}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F978}-\x{1F9B4}]|[\x{1F9B5}\x{1F9B6}][\x{1F3FB}-\x{1F3FF}]?|\x{1F9B7}|[\x{1F9B8}\x{1F9B9}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F9BA}|\x{1F9BB}[\x{1F3FB}-\x{1F3FF}]?|[\x{1F9BC}-\x{1F9CC}]|[\x{1F9CD}-\x{1F9CF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?|[\x{1F3FB}-\x{1F3FF}](?:\x{200D}[\x{2640}\x{2642}]\x{FE0F}?)?)?|\x{1F9D0}|\x{1F9D1}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|[\x{1F33E}\x{1F373}\x{1F37C}\x{1F384}\x{1F393}\x{1F3A4}\x{1F3A8}\x{1F3EB}\x{1F3ED}\x{1F4BB}\x{1F4BC}\x{1F527}\x{1F52C}\x{1F680}\x{1F692}]|\x{1F91D}\x{200D}\x{1F9D1}|[\x{1F9AF}-\x{1F9B3}\x{1F9BC}\x{1F9BD}])|\x{1F3FB}(?:\x{200D}(?:[\x{2695}\x{2696}\x{2708}]\x{FE0F}?|\x{2764}\x{FE0F}?\x{200D}(?:\x{1F48B}\x{200D}|)\x{1F9D1}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C0}-\x{1FAC2}]|[\x{1FAC3}-\x{1FAC5}][\x{1F3FB}-\x{1F3FF}]?|[\x{1FAD0}-\x{1FAD9}\x{1FAE0}-\x{1FAE7}]|\x{1FAF0}[\x{1F3FB}-\x{1F3FF}]?|\x{1FAF1}(?:\x{1F3FB}(?:\x{200D}\x{1FAF2}[\x{1F3FC}-\x{1F3FF}])?|\x{1F3FC}(?:\x{200D}\x{1FAF2}[\x{1F3FB}\x{1F3FD}-\x{1F3FF}])?|\x{1F3FD}(?:\x{200D}\x{1FAF2}[\x{1F3FB}\x{1F3FC}\x{1F3FE}\x{1F3FF}])?|\x{1F3FE}(?:\x{200D}\x{1FAF2}[\x{1F3FB}-\x{1F3FD}\x{1F3FF}])?|\x{1F3FF}(?:\x{200D}\x{1FAF2}[\x{1F3FB}-\x{1F3FE}])?)?|[\x{1FAF2}-\x{1FAF6}][\x{1F3FB}-\x{1F3FF}]?`)

See the RE2 regex demo, now it matches all the current 4702 emojis.

Information answered 19/9, 2016 at 16:17 Comment(2)
Note this doesn't handle all emojis. E.g. ๐Ÿ‘ โ€“ Opportuna
@BenJohnson I know it now, I did not 5 years ago. โ€“ Maurya
C
1

My other complete answer was deleted, accidentally I assume.

This is how to match v14 (and below) IEmoji characters using regex with Go.
It is a UTF-8/32 regex.
This regex is 3k in size and matches a minimum of 120,000 IEmoji's per second.
There is no regex that is faster.

[0-9#*]๏ธ?โƒฃ|[ยฉยฎโ€ผโ‰โ„ขโ„นโ†”-โ†™โ†ฉโ†ชโŒจโโญ-โฏโฑโฒโธ-โบโ“‚โ–ชโ–ซโ–ถโ—€โ—ปโ—ผโ˜€-โ˜„โ˜Žโ˜‘โ˜˜โ˜ โ˜ขโ˜ฃโ˜ฆโ˜ชโ˜ฎโ˜ฏโ˜ธ-โ˜บโ™€โ™‚โ™Ÿโ™ โ™ฃโ™ฅโ™ฆโ™จโ™ปโ™พโš’โš”-โš—โš™โš›โšœโš โšงโšฐโšฑโ›ˆโ›โ›‘โ›“โ›ฉโ›ฐโ›ฑโ›ดโ›ทโ›ธโœ‚โœˆโœ‰โœโœ’โœ”โœ–โœโœกโœณโœดโ„โ‡โฃโžกโคดโคตโฌ…-โฌ‡ใ€ฐใ€ฝใŠ—ใŠ™๐Ÿ…ฐ๐Ÿ…ฑ๐Ÿ…พ๐Ÿ…ฟ๐Ÿˆ‚๐Ÿˆท๐ŸŒก๐ŸŒค-๐ŸŒฌ๐ŸŒถ๐Ÿฝ๐ŸŽ–๐ŸŽ—๐ŸŽ™-๐ŸŽ›๐ŸŽž๐ŸŽŸ๐Ÿ๐ŸŽ๐Ÿ”-๐ŸŸ๐Ÿต๐Ÿท๐Ÿฟ๐Ÿ“ฝ๐Ÿ•‰๐Ÿ•Š๐Ÿ•ฏ๐Ÿ•ฐ๐Ÿ•ณ๐Ÿ•ถ-๐Ÿ•น๐Ÿ–‡๐Ÿ–Š-๐Ÿ–๐Ÿ–ฅ๐Ÿ–จ๐Ÿ–ฑ๐Ÿ–ฒ๐Ÿ–ผ๐Ÿ—‚-๐Ÿ—„๐Ÿ—‘-๐Ÿ—“๐Ÿ—œ-๐Ÿ—ž๐Ÿ—ก๐Ÿ—ฃ๐Ÿ—จ๐Ÿ—ฏ๐Ÿ—ณ๐Ÿ—บ๐Ÿ›‹๐Ÿ›-๐Ÿ›๐Ÿ› -๐Ÿ›ฅ๐Ÿ›ฉ๐Ÿ›ฐ๐Ÿ›ณ]๏ธ?|[โ˜โœŒโœ๐Ÿ•ด๐Ÿ–][๏ธ๐Ÿป-๐Ÿฟ]?|[โ›น๐Ÿ‹๐ŸŒ๐Ÿ•ต](?:โ€[โ™€โ™‚]๏ธ?|[๏ธ๐Ÿป-๐Ÿฟ](?:โ€[โ™€โ™‚]๏ธ?)?)?|[โœŠโœ‹๐ŸŽ…๐Ÿ‚๐Ÿ‡๐Ÿ‘‚๐Ÿ‘ƒ๐Ÿ‘†-๐Ÿ‘๐Ÿ‘ฆ๐Ÿ‘ง๐Ÿ‘ซ-๐Ÿ‘ญ๐Ÿ‘ฒ๐Ÿ‘ด-๐Ÿ‘ถ๐Ÿ‘ธ๐Ÿ‘ผ๐Ÿ’ƒ๐Ÿ’…๐Ÿ’๐Ÿ’‘๐Ÿ’ช๐Ÿ•บ๐Ÿ–•๐Ÿ––๐Ÿ™Œ๐Ÿ™๐Ÿ›€๐Ÿ›Œ๐ŸคŒ๐Ÿค๐Ÿค˜-๐ŸคŸ๐Ÿคฐ-๐Ÿคด๐Ÿคถ๐Ÿฅท๐Ÿฆต๐Ÿฆถ๐Ÿฆป๐Ÿง’๐Ÿง“๐Ÿง•๐Ÿซƒ-๐Ÿซ…๐Ÿซฐ๐Ÿซฒ-๐Ÿซถ][๐Ÿป-๐Ÿฟ]?|โค(?:โ€[๐Ÿ”ฅ๐Ÿฉน]|๏ธ(?:โ€[๐Ÿ”ฅ๐Ÿฉน])?)?|๐Ÿ‡ฆ[๐Ÿ‡จ-๐Ÿ‡ฌ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ฒ๐Ÿ‡ด๐Ÿ‡ถ-๐Ÿ‡บ๐Ÿ‡ผ๐Ÿ‡ฝ๐Ÿ‡ฟ]|๐Ÿ‡ง[๐Ÿ‡ฆ๐Ÿ‡ง๐Ÿ‡ฉ-๐Ÿ‡ฏ๐Ÿ‡ฑ-๐Ÿ‡ด๐Ÿ‡ถ-๐Ÿ‡น๐Ÿ‡ป๐Ÿ‡ผ๐Ÿ‡พ๐Ÿ‡ฟ]|๐Ÿ‡จ[๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡ซ-๐Ÿ‡ฎ๐Ÿ‡ฐ-๐Ÿ‡ต๐Ÿ‡ท๐Ÿ‡บ-๐Ÿ‡ฟ]|๐Ÿ‡ฉ[๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ‡ฏ๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡ด๐Ÿ‡ฟ]|๐Ÿ‡ช[๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ‡ญ๐Ÿ‡ท-๐Ÿ‡บ]|๐Ÿ‡ซ[๐Ÿ‡ฎ-๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡ด๐Ÿ‡ท]|๐Ÿ‡ฌ[๐Ÿ‡ฆ๐Ÿ‡ง๐Ÿ‡ฉ-๐Ÿ‡ฎ๐Ÿ‡ฑ-๐Ÿ‡ณ๐Ÿ‡ต-๐Ÿ‡บ๐Ÿ‡ผ๐Ÿ‡พ]|๐Ÿ‡ญ[๐Ÿ‡ฐ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ท๐Ÿ‡น๐Ÿ‡บ]|๐Ÿ‡ฎ[๐Ÿ‡จ-๐Ÿ‡ช๐Ÿ‡ฑ-๐Ÿ‡ด๐Ÿ‡ถ-๐Ÿ‡น]|๐Ÿ‡ฏ[๐Ÿ‡ช๐Ÿ‡ฒ๐Ÿ‡ด๐Ÿ‡ต]|๐Ÿ‡ฐ[๐Ÿ‡ช๐Ÿ‡ฌ-๐Ÿ‡ฎ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ต๐Ÿ‡ท๐Ÿ‡ผ๐Ÿ‡พ๐Ÿ‡ฟ]|๐Ÿ‡ฑ[๐Ÿ‡ฆ-๐Ÿ‡จ๐Ÿ‡ฎ๐Ÿ‡ฐ๐Ÿ‡ท-๐Ÿ‡ป๐Ÿ‡พ]|๐Ÿ‡ฒ[๐Ÿ‡ฆ๐Ÿ‡จ-๐Ÿ‡ญ๐Ÿ‡ฐ-๐Ÿ‡ฟ]|๐Ÿ‡ณ[๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ช-๐Ÿ‡ฌ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡ด๐Ÿ‡ต๐Ÿ‡ท๐Ÿ‡บ๐Ÿ‡ฟ]|๐Ÿ‡ด๐Ÿ‡ฒ|๐Ÿ‡ต[๐Ÿ‡ฆ๐Ÿ‡ช-๐Ÿ‡ญ๐Ÿ‡ฐ-๐Ÿ‡ณ๐Ÿ‡ท-๐Ÿ‡น๐Ÿ‡ผ๐Ÿ‡พ]|๐Ÿ‡ถ๐Ÿ‡ฆ|๐Ÿ‡ท[๐Ÿ‡ช๐Ÿ‡ด๐Ÿ‡ธ๐Ÿ‡บ๐Ÿ‡ผ]|๐Ÿ‡ธ[๐Ÿ‡ฆ-๐Ÿ‡ช๐Ÿ‡ฌ-๐Ÿ‡ด๐Ÿ‡ท-๐Ÿ‡น๐Ÿ‡ป๐Ÿ‡ฝ-๐Ÿ‡ฟ]|๐Ÿ‡น[๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ฉ๐Ÿ‡ซ-๐Ÿ‡ญ๐Ÿ‡ฏ-๐Ÿ‡ด๐Ÿ‡ท๐Ÿ‡น๐Ÿ‡ป๐Ÿ‡ผ๐Ÿ‡ฟ]|๐Ÿ‡บ[๐Ÿ‡ฆ๐Ÿ‡ฌ๐Ÿ‡ฒ๐Ÿ‡ณ๐Ÿ‡ธ๐Ÿ‡พ๐Ÿ‡ฟ]|๐Ÿ‡ป[๐Ÿ‡ฆ๐Ÿ‡จ๐Ÿ‡ช๐Ÿ‡ฌ๐Ÿ‡ฎ๐Ÿ‡ณ๐Ÿ‡บ]|๐Ÿ‡ผ[๐Ÿ‡ซ๐Ÿ‡ธ]|๐Ÿ‡ฝ๐Ÿ‡ฐ|๐Ÿ‡พ[๐Ÿ‡ช๐Ÿ‡น]|๐Ÿ‡ฟ[๐Ÿ‡ฆ๐Ÿ‡ฒ๐Ÿ‡ผ]|[๐Ÿƒ๐Ÿ„๐ŸŠ๐Ÿ‘ฎ๐Ÿ‘ฐ๐Ÿ‘ฑ๐Ÿ‘ณ๐Ÿ‘ท๐Ÿ’๐Ÿ’‚๐Ÿ’†๐Ÿ’‡๐Ÿ™…-๐Ÿ™‡๐Ÿ™‹๐Ÿ™๐Ÿ™Ž๐Ÿšฃ๐Ÿšด-๐Ÿšถ๐Ÿคฆ๐Ÿคต๐Ÿคท-๐Ÿคน๐Ÿคฝ๐Ÿคพ๐Ÿฆธ๐Ÿฆน๐Ÿง-๐Ÿง๐Ÿง”๐Ÿง–-๐Ÿง](?:โ€[โ™€โ™‚]๏ธ?|[๐Ÿป-๐Ÿฟ](?:โ€[โ™€โ™‚]๏ธ?)?)?|๐Ÿณ(?:โ€(?:โšง๏ธ?|๐ŸŒˆ)|๏ธ(?:โ€(?:โšง๏ธ?|๐ŸŒˆ))?)?|๐Ÿด(?:โ€โ˜ ๏ธ?|๓ ง๓ ข(?:๓ ฅ๓ ฎ๓ ง|๓ ณ๓ ฃ๓ ด|๓ ท๓ ฌ๓ ณ)๓ ฟ)?|๐Ÿˆ(?:โ€โฌ›)?|๐Ÿ•(?:โ€๐Ÿฆบ)?|๐Ÿป(?:โ€โ„๏ธ?)?|๐Ÿ‘(?:โ€๐Ÿ—จ๏ธ?|๏ธ(?:โ€๐Ÿ—จ๏ธ?)?)?|๐Ÿ‘จ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ|๐Ÿ‘ฆ(?:โ€๐Ÿ‘ฆ)?|๐Ÿ‘ง(?:โ€[๐Ÿ‘ฆ๐Ÿ‘ง])?|[๐Ÿ‘จ๐Ÿ‘ฉ]โ€(?:๐Ÿ‘ฆ(?:โ€๐Ÿ‘ฆ)?|๐Ÿ‘ง(?:โ€[๐Ÿ‘ฆ๐Ÿ‘ง])?)|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ])|๐Ÿป(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ[๐Ÿป-๐Ÿฟ]|๐Ÿคโ€๐Ÿ‘จ[๐Ÿผ-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿผ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ[๐Ÿป-๐Ÿฟ]|๐Ÿคโ€๐Ÿ‘จ[๐Ÿป๐Ÿฝ-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฝ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ[๐Ÿป-๐Ÿฟ]|๐Ÿคโ€๐Ÿ‘จ[๐Ÿป๐Ÿผ๐Ÿพ๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿพ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ[๐Ÿป-๐Ÿฟ]|๐Ÿคโ€๐Ÿ‘จ[๐Ÿป-๐Ÿฝ๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฟ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿ‘จ[๐Ÿป-๐Ÿฟ]|๐Ÿคโ€๐Ÿ‘จ[๐Ÿป-๐Ÿพ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?)?|๐Ÿ‘ฉ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:[๐Ÿ‘จ๐Ÿ‘ฉ]|๐Ÿ’‹โ€[๐Ÿ‘จ๐Ÿ‘ฉ])|๐Ÿ‘ฆ(?:โ€๐Ÿ‘ฆ)?|๐Ÿ‘ง(?:โ€[๐Ÿ‘ฆ๐Ÿ‘ง])?|๐Ÿ‘ฉโ€(?:๐Ÿ‘ฆ(?:โ€๐Ÿ‘ฆ)?|๐Ÿ‘ง(?:โ€[๐Ÿ‘ฆ๐Ÿ‘ง])?)|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ])|๐Ÿป(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฟ]|๐Ÿคโ€[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿผ-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿผ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฟ]|๐Ÿคโ€[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป๐Ÿฝ-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฝ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฟ]|๐Ÿคโ€[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป๐Ÿผ๐Ÿพ๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿพ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฟ]|๐Ÿคโ€[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฝ๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฟ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿฟ]|๐Ÿคโ€[๐Ÿ‘จ๐Ÿ‘ฉ][๐Ÿป-๐Ÿพ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?)?|[๐Ÿ‘ฏ๐Ÿคผ๐Ÿงž๐ŸงŸ](?:โ€[โ™€โ™‚]๏ธ?)?|๐Ÿ˜ฎ(?:โ€๐Ÿ’จ)?|๐Ÿ˜ต(?:โ€๐Ÿ’ซ)?|๐Ÿ˜ถ(?:โ€๐ŸŒซ๏ธ?)?|๐Ÿง‘(?:โ€(?:[โš•โš–โœˆ]๏ธ?|๐Ÿคโ€๐Ÿง‘|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ])|๐Ÿป(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿง‘[๐Ÿผ-๐Ÿฟ]|๐Ÿคโ€๐Ÿง‘[๐Ÿป-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿผ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿง‘[๐Ÿป๐Ÿฝ-๐Ÿฟ]|๐Ÿคโ€๐Ÿง‘[๐Ÿป-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฝ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿง‘[๐Ÿป๐Ÿผ๐Ÿพ๐Ÿฟ]|๐Ÿคโ€๐Ÿง‘[๐Ÿป-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿพ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿง‘[๐Ÿป-๐Ÿฝ๐Ÿฟ]|๐Ÿคโ€๐Ÿง‘[๐Ÿป-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?|๐Ÿฟ(?:โ€(?:[โš•โš–โœˆ]๏ธ?|โค๏ธ?โ€(?:๐Ÿ’‹โ€)?๐Ÿง‘[๐Ÿป-๐Ÿพ]|๐Ÿคโ€๐Ÿง‘[๐Ÿป-๐Ÿฟ]|[๐ŸŒพ๐Ÿณ๐Ÿผ๐ŸŽ„๐ŸŽ“๐ŸŽค๐ŸŽจ๐Ÿซ๐Ÿญ๐Ÿ’ป๐Ÿ’ผ๐Ÿ”ง๐Ÿ”ฌ๐Ÿš€๐Ÿš’๐Ÿฆฏ-๐Ÿฆณ๐Ÿฆผ๐Ÿฆฝ]))?)?|[โŒšโŒ›โฉ-โฌโฐโณโ—ฝโ—พโ˜”โ˜•โ™ˆ-โ™“โ™ฟโš“โšกโšชโšซโšฝโšพโ›„โ›…โ›Žโ›”โ›ชโ›ฒโ›ณโ›ตโ›บโ›ฝโœ…โœจโŒโŽโ“-โ•โ—โž•-โž—โžฐโžฟโฌ›โฌœโญโญ•๐Ÿ€„๐Ÿƒ๐Ÿ†Ž๐Ÿ†‘-๐Ÿ†š๐Ÿˆ๐Ÿˆš๐Ÿˆฏ๐Ÿˆฒ-๐Ÿˆถ๐Ÿˆธ-๐Ÿˆบ๐Ÿ‰๐Ÿ‰‘๐ŸŒ€-๐ŸŒ ๐ŸŒญ-๐ŸŒต๐ŸŒท-๐Ÿผ๐Ÿพ-๐ŸŽ„๐ŸŽ†-๐ŸŽ“๐ŸŽ -๐Ÿ๐Ÿ…๐Ÿ†๐Ÿˆ๐Ÿ‰๐Ÿ-๐Ÿ“๐Ÿ -๐Ÿฐ๐Ÿธ-๐Ÿ‡๐Ÿ‰-๐Ÿ”๐Ÿ–-๐Ÿบ๐Ÿผ-๐Ÿพ๐Ÿ‘€๐Ÿ‘„๐Ÿ‘…๐Ÿ‘‘-๐Ÿ‘ฅ๐Ÿ‘ช๐Ÿ‘น-๐Ÿ‘ป๐Ÿ‘ฝ-๐Ÿ’€๐Ÿ’„๐Ÿ’ˆ-๐Ÿ’Ž๐Ÿ’๐Ÿ’’-๐Ÿ’ฉ๐Ÿ’ซ-๐Ÿ“ผ๐Ÿ“ฟ-๐Ÿ”ฝ๐Ÿ•‹-๐Ÿ•Ž๐Ÿ•-๐Ÿ•ง๐Ÿ–ค๐Ÿ—ป-๐Ÿ˜ญ๐Ÿ˜ฏ-๐Ÿ˜ด๐Ÿ˜ท-๐Ÿ™„๐Ÿ™ˆ-๐Ÿ™Š๐Ÿš€-๐Ÿšข๐Ÿšค-๐Ÿšณ๐Ÿšท-๐Ÿšฟ๐Ÿ›-๐Ÿ›…๐Ÿ›-๐Ÿ›’๐Ÿ›•-๐Ÿ›—๐Ÿ›-๐Ÿ›Ÿ๐Ÿ›ซ๐Ÿ›ฌ๐Ÿ›ด-๐Ÿ›ผ๐ŸŸ -๐ŸŸซ๐ŸŸฐ๐Ÿค๐ŸคŽ๐Ÿค-๐Ÿค—๐Ÿค -๐Ÿคฅ๐Ÿคง-๐Ÿคฏ๐Ÿคบ๐Ÿคฟ-๐Ÿฅ…๐Ÿฅ‡-๐Ÿฅถ๐Ÿฅธ-๐Ÿฆด๐Ÿฆท๐Ÿฆบ๐Ÿฆผ-๐ŸงŒ๐Ÿง๐Ÿง -๐Ÿงฟ๐Ÿฉฐ-๐Ÿฉด๐Ÿฉธ-๐Ÿฉผ๐Ÿช€-๐Ÿช†๐Ÿช-๐Ÿชฌ๐Ÿชฐ-๐Ÿชบ๐Ÿซ€-๐Ÿซ‚๐Ÿซ-๐Ÿซ™๐Ÿซ -๐Ÿซง]|๐Ÿซฑ(?:๐Ÿป(?:โ€๐Ÿซฒ[๐Ÿผ-๐Ÿฟ])?|๐Ÿผ(?:โ€๐Ÿซฒ[๐Ÿป๐Ÿฝ-๐Ÿฟ])?|๐Ÿฝ(?:โ€๐Ÿซฒ[๐Ÿป๐Ÿผ๐Ÿพ๐Ÿฟ])?|๐Ÿพ(?:โ€๐Ÿซฒ[๐Ÿป-๐Ÿฝ๐Ÿฟ])?|๐Ÿฟ(?:โ€๐Ÿซฒ[๐Ÿป-๐Ÿพ])?)?

Golang https://regex101.com/r/qep8ZJ/1


The same regex is used for these other engine(s)/lang's:

PCRE https://regex101.com/r/AlO8QD/1
Python https://regex101.com/r/iCzyv2/1
ECMAScript https://regex101.com/r/BoyE2n/1
Java8 https://regex101.com/r/lYqUQ7/1

Concision answered 15/12, 2021 at 18:6 Comment(0)

© 2022 - 2024 โ€” McMap. All rights reserved.