I search for
Light show,
But it match
Highlights of previous show,
Then, how to do exact match? (I tried double quote, but search result shows nothing)
QNS: How to exact match?
-
binocular222
- Posts: 1424
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
QNS: How to exact match?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: QNS: How to exact match? Quick Name Search
I don't know if I get you correctly? Please describe yourself more clearly and provide better examples
How do you utilize Quick Name Search (QNS)?
To do an exact match from the address bar, just write the exact name into the address bar like:
C:\Temp\exactname.txt
and exactname.txt will be highlighted.
Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.
C:\Temp\?>^exactname.*.txt$
.
How do you utilize Quick Name Search (QNS)?
To do an exact match from the address bar, just write the exact name into the address bar like:
C:\Temp\exactname.txt
and exactname.txt will be highlighted.
Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.
C:\Temp\?>^exactname.*.txt$
.
-
binocular222
- Posts: 1424
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
Re: QNS: How to exact match?
The problem is the space chacracter. Searching for Light show, should not match Highlights of previous show, but in XY, it's a match.
I want to do exact match for Light show, (with the space in between).
Regex does the trick, but it's much slower than QNS
I want to do exact match for Light show, (with the space in between).
Regex does the trick, but it's much slower than QNS
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: QNS: How to exact match?
Searching for just ?light show tells XY to search for anything containing light AND show which can be useful at times. For details on what is going on check out Loose Boolean Match under the Name section of the Find Files page in the documentation. (Or included below...)
You say double-quotes didn't work for you, but they seem to work for me:Another option would be to surround it with wildcards (?*light show*) so XY treats it as a single query, but this might still match more than you want:You also get similar results to the last one by telling XY to treat the pattern as boolean (?:light show) or regular expression (?>light show).
You say double-quotes didn't work for you, but they seem to work for me:Another option would be to surround it with wildcards (?*light show*) so XY treats it as a single query, but this might still match more than you want:You also get similar results to the last one by telling XY to treat the pattern as boolean (?:light show) or regular expression (?>light show).
[/size]Help wrote:Loose Boolean Match (LBM)
Mimics Windows Explorer behavior, where you can enter two or more strings separated by blanks and find al items that match ALL of the strings (i.e. they are AND-combined logically).
For example, "work 2006" (without the quotes) will find all items that have "work" and "2006" somewhere in their name (regardless of the order). In other words, "work 2006" is internally-smartly-automatically-conveniently transmutated into the Boolean expression "*work* AND *2006*".
- LBM does only work in Standard Mode (see above)
- Note that OR-combining patterns (using ";", see Simple multiple pattern search above) has precedence over LBM, so the following search termis interpreted asCode: Select all
a;b cand not asCode: Select all
"*a*" OR "*b c*"- To avoid LBM and find all items containing "work 2006" somewhere in their name enclose it in asterisks: "*work 2006*".Code: Select all
"*a;b*" AND "*c*"
- To avoid LBM and find all items matching "work 2006" exactly put it in quotes (a leading quote is enough).
- Note that LBM can be inverted by "!", and it does work from the Address Bar as well, for example:Code: Select all
Desktop?a b c Find all items that contain the characters a, b, and c in their name. Desktop?!a b c Find all items that do not contain all the characters a, b, and c in their name (but only some or none of them).
To see the attached files, you need to log into the forum.
-
binocular222
- Posts: 1424
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
Re: QNS: How to exact match?
Thanks,
Wrapping around asterisk works, but it's strange that the double quote refuse to work for me
Wrapping around asterisk works, but it's strange that the double quote refuse to work for me
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: QNS: How to exact match?
Thanks binocular222 for raising a functional question beneficial to our XY daily usage.
Thanks Stehan & TheQwerty's painstaking effort to shed light on the QNS.
BTW, Stehan, by 'jokers,' do you mean Batman? I'm confused! 
Thanks Stehan & TheQwerty's painstaking effort to shed light on the QNS.
Stefan wrote:Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: QNS: How to exact match?
No, I meant "wildcard character" like '*' and '?', in german called 'Joker', and I was assuming that's true in english tooarmsys wrote:Stefan wrote:Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.BTW, Stehan, by 'jokers,' do you mean Batman? I'm confused!
oder Platzhalter ist ein Fachausdruck aus dem Computer-Bereich und bezeichnet einen Platzhalter für andere Zeichen.
(from wikipedia)
.
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: QNS: How to exact match?
Es tut mir leid. Ich spiele nicht Karte. Das ist, warum ich den Joker verpassen.Stefan wrote:Wildcard (vom englischen Wildcard, einer Spielkarte im Poker), Joker (nach Joker, einer Spielkarte)
oder Platzhalter ist ein Fachausdruck aus dem Computer-Bereich und bezeichnet einen Platzhalter für andere Zeichen. .
Vielen Dank für Ihre Klarstellung.
-
armsys
- Posts: 557
- Joined: 10 Mar 2012 12:40
- Location: Hong Kong
Re: QNS: How to exact match?
Hi TheQuerty,TheQwerty wrote:Searching for just ?light show tells XY to search for anything containing light AND show which can be useful at times. For details on what is going on check out Loose Boolean Match under the Name section of the Find Files page in the documentation. (Or included below...)
Thank you for your moving heaven & earth effort
Code: Select all
a;b c is interpreted as "*a*" OR "*b c*"
and not as "*a;b*" AND "*c*"But you remind us the reverse.
Question:
I wonder if Don has optimized the OR operator to speed up the comparison.
For example, for "?A;B", if A is TRUE (found in a filename), will XY skips B?
Appreciate your enormous contribution to the XY community.
-
admin
- Site Admin
- Posts: 67223
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: QNS: How to exact match?
Of course!armsys wrote:I wonder if Don has optimized the OR operator to speed up the comparison.
For example, for "?A;B", if A is TRUE (found in a filename), will XY skips B?
FAQ | XY News RSS | XY X
XYplorer Beta Club