Page 1 of 1

QNS: How to exact match?

Posted: 06 Nov 2013 19:32
by binocular222
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)

Re: QNS: How to exact match? Quick Name Search

Posted: 06 Nov 2013 20:46
by Stefan
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$



.

Re: QNS: How to exact match?

Posted: 07 Nov 2013 03:52
by binocular222
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

Re: QNS: How to exact match?

Posted: 07 Nov 2013 13:46
by TheQwerty
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:
screenshot.13.png
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:
screenshot.14.png
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).


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 term

Code: Select all

a;b c
is interpreted as

Code: Select all

"*a*" OR "*b c*"
and not as

Code: Select all

"*a;b*" AND "*c*"
- To avoid LBM and find all items containing "work 2006" somewhere in their name enclose it in asterisks: "*work 2006*".

- 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).
[/size]

Re: QNS: How to exact match?

Posted: 08 Nov 2013 03:13
by binocular222
Thanks,
Wrapping around asterisk works, but it's strange that the double quote refuse to work for me

Re: QNS: How to exact match?

Posted: 08 Nov 2013 11:13
by armsys
Thanks binocular222 for raising a functional question beneficial to our XY daily usage. :appl:
Thanks Stehan & TheQwerty's painstaking effort to shed light on the QNS. :appl:
Stefan wrote:Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.
:blackstorm: BTW, Stehan, by 'jokers,' do you mean Batman? I'm confused! :roll:

Re: QNS: How to exact match?

Posted: 08 Nov 2013 12:45
by Stefan
armsys wrote:
Stefan wrote:Read the help under "Main Topics" about "Quick Name Search" to discover more examples with jokers and regex.
:blackstorm: BTW, Stehan, by 'jokers,' do you mean Batman? I'm confused! :roll:
No, I meant "wildcard character" like '*' and '?', in german called 'Joker', and I was assuming that's true in english too :roll:


:arrow: In computer (software) technology, a wildcard character can be used to substitute for any other character or characters in a string.

:arrow: 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.

(from wikipedia)


.

Re: QNS: How to exact match?

Posted: 08 Nov 2013 13:29
by armsys
Stefan wrote: :arrow: 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. .
Es tut mir leid. Ich spiele nicht Karte. Das ist, warum ich den Joker verpassen. :oops:
Vielen Dank für Ihre Klarstellung. :appl:

Re: QNS: How to exact match?

Posted: 09 Nov 2013 10:00
by armsys
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...)
Hi TheQuerty,
Thank you for your moving heaven & earth effort :blackstorm: in graphically elucidating the nuances of various LBM patterns which were foggy to me. In particular, I'm impressed by your illustrious example:

Code: Select all

a;b c is interpreted as "*a*" OR "*b c*"
and not as "*a;b*" AND "*c*"
Usually other apps (such as Ultra Recall) take AND precedence over OR.
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. :appl: :appl: :appl:

Re: QNS: How to exact match?

Posted: 09 Nov 2013 11:50
by admin
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?
Of course! :ugeek: