I want to replace all of emoji s in string by regex in golang.
Like this :
Thats a nice joke
I want to replace all of emoji s in string by regex in golang.
Like this :
Thats a nice joke
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