Page 1 of 1

show only files with english character?

Posted: 13 Apr 2014 20:46
by yusef88
how to do that?

Re: show only files with english character?

Posted: 13 Apr 2014 21:44
by admin
Interesting question. It is actually possible now through a scripted search, but it would be quite some work and not be very fast.

Why do you need this?

Re: show only files with english character?

Posted: 13 Apr 2014 22:04
by Marco
Something with regexmatches and VF comes to my mind: that would be fast but
- could be limited by the max number of single items the VF code can handle
- would need to be applied every time you change location

Please define "English characters".

Re: show only files with english character?

Posted: 13 Apr 2014 22:21
by yusef88
in the list, files have same type ,their names: some are arabic and the other is english and i need to jump quickly to the english ones

Re: show only files with english character?

Posted: 13 Apr 2014 22:27
by yusef88
@ Marco
it would be an appropriate solution
English characters="abc"

Re: show only files with english character?

Posted: 13 Apr 2014 22:42
by Marco
And what about "def...z"? And punctuation? Diacritics? Maybe numbers too?

Re: show only files with english character?

Posted: 13 Apr 2014 22:56
by yusef88
I really appreciate If you wrote all of the letters from A to Z,numbers and punctuation :D

Re: show only files with english character?

Posted: 13 Apr 2014 22:57
by Enternal
I'm don't have an XYplorer installation on this computer right now but does Visual Filters support any sort of Regular Expression? It could be possible to simply use >[a-zA-Z0-9 ]+ (something like that. Not very good at using RegEx) for the Regular Expression and that should display all files that have those in their names... or something like that.

Re: show only files with english character?

Posted: 14 Apr 2014 01:29
by Marco
yusef88 wrote:in the list, files have same type ,their names: some are arabic and the other is english and i need to jump quickly to the english ones
Ok, this VF should exclude every item containing at least one character of the Arabic alphabet, as per https://en.wikipedia.org/wiki/Arabic_alphabet

Code: Select all

!>[غ ف ق ك ل م ن ه و ي ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع]
Many thanks to Enternal for pointing out that VF support regex, didn't think of that at first.

Re: show only files with english character?

Posted: 14 Apr 2014 01:57
by yusef88
Marco wrote:

Code: Select all

!>[غ ف ق ك ل م ن ه و ي ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع]
very good, thanks Marco :appl: if i want show these letters only? (important question to me)
what should I put instead "!>" to keep arabic letters?
===============
found the answer

Code: Select all

"Arabic" >[ذضصثقفغعهخحجدطكمنتالبيسشئءؤرلاىةوزظآأإ]

Re: show only files with english character?

Posted: 14 Apr 2014 12:18
by Marco
Glad that it helped :)
Actually, I realize that my solution isn't logically equivalent to your original question, because
"showing only the files with English letters" is not the same as "not showing the files with at least one Arabic letter" - but this is truly nitpicking.
Question: are this

Code: Select all

غ ف ق ك ل م ن ه و ي ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع
and this

Code: Select all

ذضصثقفغعهخحجدطكمنتالبيسشئءؤرلاىةوزظآأإ
exactly the same lists, apart from the additional space(s) in the first one? I ask because then my first regex isn't 100% correct, because it also excludes items containing a space in the name (I'm not familiar with Arabic ligatures!).

Re: show only files with english character?

Posted: 14 Apr 2014 13:16
by admin
Maybe it would be enough to test for the Right-to-left mark (http://en.wikipedia.org/wiki/Right-to-left_mark)?

Re: show only files with english character?

Posted: 14 Apr 2014 13:37
by Marco
No. See yourself - no RtL mark.
Immagine.png

Code: Select all

  #  char	  dec   hex  utf8  	utf8hex

  1   أ  	 1571   623   Ø£  	D8 A3  	
  2   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
  3   ب  	 1576   628   ب  	D8 A8  	
  4   ْ  	 1618   652   Ù’  	D9 00 19 20  	
  5   ج  	 1580   62C   ج  	D8 AC  	
  6   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
  7   د  	 1583   62F   د  	D8 AF  	
  8   ِ  	 1616   650   ِ  	D9 90  	
  9   ي  	 1610   64A   ÙŠ  	D9 00 60 01  	
 10   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
 11   ّ  	 1617   651   Ù‘  	D9 00 18 20  	
 12   ة  	 1577   629   Ø©  	D8 A9  	
 13      	   32    20       	20  	
 14   ع  	 1593   639   ع  	D8 B9  	
 15   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
 16   ر  	 1585   631   ر  	D8 B1  	
 17   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
 18   ب  	 1576   628   ب  	D8 A8  	
 19   ِ  	 1616   650   ِ  	D9 90  	
 20   ي  	 1610   64A   ÙŠ  	D9 00 60 01  	
 21   َ  	 1614   64E   ÙŽ  	D9 00 7D 01  	
 22   ّ  	 1617   651   Ù‘  	D9 00 18 20  	
 23   ة  	 1577   629   Ø©  	D8 A9  	
 24      	   32    20       	20  	
 25   L  	   76    4C    L  	4C  	
 26   o  	  111    6F    o  	6F  	
 27   r  	  114    72    r  	72  	
 28   e  	  101    65    e  	65  	
 29   m  	  109    6D    m  	6D  	
 30      	   32    20       	20  	
 31   i  	  105    69    i  	69  	
 32   p  	  112    70    p  	70  	
 33   s  	  115    73    s  	73  	
 34   u  	  117    75    u  	75  	
 35   m  	  109    6D    m  	6D  	
 36   .  	   46    2E    .  	2E  	
 37   t  	  116    74    t  	74  	
 38   x  	  120    78    x  	78  	
 39   t  	  116    74    t  	74  	

Re: show only files with english character?

Posted: 14 Apr 2014 14:20
by yusef88
Marco wrote:

Code: Select all

غ ف ق ك ل م ن ه و ي ا ب ت ث ج ح خ د ذ ر ز س ش ص ض ط ظ ع
and this

Code: Select all

ذضصثقفغعهخحجدطكمنتالبيسشئءؤرلاىةوزظآأإ
exactly they are same lists, apart from the additional space(s) in the first one? I ask because then my first regex isn't 100% correct, because it also excludes items containing a space in the name (I'm not familiar with Arabic ligatures!).
almost they are same without spaces and not excluding items containing a space in the name
:kidding: شكرا جزيلا صديقي ماركو

Re: show only files with english character?

Posted: 14 Apr 2014 21:52
by Marco
:D كنت موضع ترحيب