var ranges = [
'\ud83c[\udf00-\udfff]',
'\ud83d[\udc00-\ude4f]',
'\ud83d[\ude80-\udeff]'
]
var remark = remark.replace(new RegExp(ranges.join('|'), 'g'), '').replace(/\s+/g, '');
var ranges = [
'\ud83c[\udf00-\udfff]',
'\ud83d[\udc00-\ude4f]',
'\ud83d[\ude80-\udeff]'
]
var remark = remark.replace(new RegExp(ranges.join('|'), 'g'), '').replace(/\s+/g, '');