Remove emoji from file name but keep Chinese/Japanese words
Hi, guys and gals. Need some help here, thanks for reading and assists.
I try to rename a bunch of files, with some emojis on the filename.
Example: 1234 😋♥ •一二三四 1
to
Result: 1234 一二三四 1
I try some method I found on forum.
Remove pattern: [^ a-z0-9]
Use regular expressions
But it will remove the Chinese/ Japanese words too. (Became 1234 1)
How to just remove emojis ONLY, instead of remove emojis and Chinese/ Japanese words?
I need some method for just remove EMOJIS.
Can somebody help?
I try to rename a bunch of files, with some emojis on the filename.
Example: 1234 😋♥ •一二三四 1
to
Result: 1234 一二三四 1
I try some method I found on forum.
Remove pattern: [^ a-z0-9]
Use regular expressions
But it will remove the Chinese/ Japanese words too. (Became 1234 1)
How to just remove emojis ONLY, instead of remove emojis and Chinese/ Japanese words?
I need some method for just remove EMOJIS.
Can somebody help?
You are on the right lines. Simply add the Unicode range of Chinese characters to your list of excluded characters.
Common Han characters are in the hex range 4E00-9FFF so try using the pattern: [^a-z0-9\x{4E00}-\x{9FFF}]
Japanese and less common Chinese characters span other ranges - eg I believe Katakana characters lie in the range 30A0–30FF - so you may need to add additional ranges. Google is your friend!
Common Han characters are in the hex range 4E00-9FFF so try using the pattern: [^a-z0-9\x{4E00}-\x{9FFF}]
Japanese and less common Chinese characters span other ranges - eg I believe Katakana characters lie in the range 30A0–30FF - so you may need to add additional ranges. Google is your friend!
Reply to #2:
Thank you so much!!!!! David Lee.
That's EXACTLY what I need it. So it called "Unicode range of", I just don't know what to search and where to start.
Thanks again for provide some tips.
Thank you so much!!!!! David Lee.
That's EXACTLY what I need it. So it called "Unicode range of", I just don't know what to search and where to start.
Thanks again for provide some tips.