I have a $text = "Hello üäö$"
I wanted to remove just emoji's from the text using xquery . How can i do that?
expected result: "Hello üäö$"
i tried to use:
replace($text, '[^\x00-\xFFFF]', '')
but didn't work.
Thanks in advance:)
To replace emoji, you can make use of XPath's support for Character Class Escapes , specifically Category Escapes, to match named Unicode blocks:
replace("Hello 😀😃😄 üäö$", "\p{IsEmoticons}+", "")
This returns the expected result:
Hello üäö$
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.