private String removeEmoji(String str) {
String characterFilter = "[^\\p{L}\\p{M}\\p{N}\\p{P}\\p{Z}\\p{Cf}\\p{Cs}\\p{C}\\s<>~`$^+=]";
return str.replaceAll(characterFilter, "");
}
참고: https://ko.javascript.info/regexp-unicode
반응형
private String removeEmoji(String str) {
String characterFilter = "[^\\p{L}\\p{M}\\p{N}\\p{P}\\p{Z}\\p{Cf}\\p{Cs}\\p{C}\\s<>~`$^+=]";
return str.replaceAll(characterFilter, "");
}
참고: https://ko.javascript.info/regexp-unicode