- preg_quote: documentation ( source)
- preg_replace: documentation ( source)
<?php
// Regex for single and paired point unicode characters ranges: https://stackoverflow.com/q/51947319/6225838
$str = '☀,⛿,#⃣,😀 ,🙏,⏳';
echo preg_replace(
// single point unicode list
"/[\x{2600}-\x{26FF}".
// http://www.fileformat.info/info/unicode/block/miscellaneous_symbols/list.htm
// concatenates with paired surrogates
preg_quote("\u{1F600}", '/')."-".preg_quote("\u{1F64F}", '/').
// https://www.fileformat.info/info/unicode/block/emoticons/list.htm
"]/u",
'YOINK',
$str
);