The files I'm looking for are of the form cmn-我.flac
, where the CJK character is variable.
Using find
command, what regexp should I use to find all files with a single CJK characters in its name?
Hints: The following regexp find all files including those with and without CJK characters :
find ./ -regex '.*\..*' # ex: cmn-我.flac
Then :
find ./ -regex "cmn-.*[\x4e00-\x9fa5]*\.flac" # the `-` breaks => fails
find ./ -regex ".*[\x4e00-\x9fa5]*\.flac" # finds with n CJK characters => we get closer!
find ./ -regex ".*[\x4e00-\x9fa5]{1}\.flac" # the `{1}` breaks => fails.
find ./ -regex ".*[\x4e00-\x9fa5]?\.flac" # the `?` breaks => fails.
How to make it works ?