I just needed to find all files with any Chinese characters in the name. But, hmmm, could not find a way in XYplorer.
1) Is there a way that I just did not see (I'm no RegExp man)?
2) Should I add a way to do this (search files by a certain range of characters in the name)?
Find files with any Chinese characters in the name
Re: Find files with any Chinese characters in the name
Probably something like (this is a regex range)
But maybe you need to extend this (look e.g. at: https://stackoverflow.com/a/11415841)
[\u4E00-\u9FFF\u6300-\u77FF\u7800-\u8CFF\u8D00-\u9FFF]+
But maybe you need to extend this (look e.g. at: https://stackoverflow.com/a/11415841)
One of my scripts helped you out? Please donate via Paypal
Re: Find files with any Chinese characters in the name
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Find files with any Chinese characters in the name
Cool, this seems to work good enough in Quick Search:
What is the meaning of the final +?
And, to show all files with any character above the ANSI range (0-255)? I thought this should work, but it does not:
Code: Select all
>[\u4E00-\u9FFF\u6300-\u77FF\u7800-\u8CFF\u8D00-\u9FFF]+
And, to show all files with any character above the ANSI range (0-255)? I thought this should work, but it does not:
Code: Select all
>[\u0100-\uFFFF]+
FAQ | XY News RSS | XY Twitter
Re: Find files with any Chinese characters in the name
At least one, up to unlimited matches of one of the chars inside the range
Don't know why it doesn't work in XY. It works in RegexBuddy...
E.g. Search: [\u0100-\uFFFF]+
Replace: -
Source: a鿌b鿍c
Result: a-b-c
Don't know why it doesn't work in XY. It works in RegexBuddy...
E.g. Search: [\u0100-\uFFFF]+
Replace: -
Source: a鿌b鿍c
Result: a-b-c
One of my scripts helped you out? Please donate via Paypal
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Find files with any Chinese characters in the name
Made some tests:
But I don't see the pattern. Do you?
\u0130 = 0x0130 = decimal 304
This character is not existing in any of my filenames...
>[\u0130-\uFFFF]+
matches lots of files.>[\u0131-\uFFFF]+
matches only a few files.But I don't see the pattern. Do you?
\u0130 = 0x0130 = decimal 304
echo chr(0x0130); //LATIN CAPITAL LETTER I WITH DOT ABOVE
(see https://unicodemap.org/details/0x0130/index.html)This character is not existing in any of my filenames...
FAQ | XY News RSS | XY Twitter
Re: Find files with any Chinese characters in the name
Nope.But I don't see the pattern. Do you?
One of my scripts helped you out? Please donate via Paypal
Re: Find files with any Chinese characters in the name
Probably because https://stackoverflow.com/questions/469 ... javascript
Anyway, the VF to find all Han ideograms is
(which is the expansion of
Anyway, the VF to find all Han ideograms is
Code: Select all
"\p{Han}" >[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FCC\uF900-\uFA6D\uFA70-\uFAD9]|(?# \U00020000-\U0002A6D6 <<<)\uD840[\uDC00-\uDFFF]|[\uD841-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6](?#>>>)|(?# \U0002A700-\U0002B734 <<<)\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34](?#>>>)|(?# \U0002B740-\U0002B81D <<<)\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D](?#>>>)|(?# \U0002F800-\U0002FA1D <<<)\uD87E[\uDC00-\uDE1D](?#>>>)
\p{Han}
)Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
- Site Admin
- Posts: 60602
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Find files with any Chinese characters in the name
Interesting, thanks!
FAQ | XY News RSS | XY Twitter