Page 1 of 2
21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 17:11
by Jerry
[Using 21.60.0104]
I am trying to use the following expression in Quick Search without success. This expression had been working before in a 21.50 beta version before I upgraded to 21.60.0104.
\[incomplete\] /d
It is supposed to find all folders that contain "[incomplete]" in the name. I found that I didn't get the right results if I did not escape the brackets (and still don't). But now escaping the brackets isn't working.
I think this is probably related to the change introduced in v21.50.0141 which implicitly turned on the Path matching switch
whenever the search term contains backslashes that are not just escapes for certain
characters that would otherwise seen as special characters (e.g.: " \!", "\[", " \(", "cat \and dog", ...),
But I
am escaping special characters here and I'm only seeking to match the folder names.
The expression now returns no results, but results do exist.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 18:13
by admin
Do the search, then run this script:
What is returned?
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 19:13
by Jerry
It returns this:
Code: Select all
Query: \[incomplete\] /d
Parsed: name:"*[[]incomplete\]*"
Search: Find Files
Mode: Standard
SmartBooleanQueryParsing: Yes
ExtendedPatternMatching: Yes
MasterInvert: Yes
Tags DB Only: No
MatchCase: No WholeWords: No Invert: No
IgnoreDiacritics: No Path: Yes FindHidden: No
Search Path: S:\
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 19:17
by admin
The chef recommends this pattern: \[incomplete] /d
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 19:21
by highend
Even if that works, \[incomplete\] /d should work as well.
It's the same for regexes (in general). The closing square bracket doesn't necessarily needs to be escaped but it works fine if it is...
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 19:25
by admin
Okidoki, if you say so it shall happen.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 20:00
by Jerry
highend wrote: ↑26 Mar 2021 19:21
Even if that works,
\[incomplete\] /d should work as well.
I would very much agree with that. The parsing shouldn't make any assumptions about matching brackets and similar paired characters if they are escaped and not otherwise regexp syntax.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 20:47
by Jerry
v21.60.0105
It works. Thanks!

Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 26 Mar 2021 21:05
by Jerry
Oops, another problem:
That original regexp search pattern I use which motivated the Path feature is not working now:
>\)\\AltRip$ /P
Below is the parsed query info. The parsed expression looks correct and it's checking the Path option, but no results are being returned.
Code: Select all
Query: >\)\\AltRip$ /P
Parsed: RegEx[\)\\AltRip$]
Search: Find Files
Mode: RegExp
SmartBooleanQueryParsing: Yes
ExtendedPatternMatching: Yes
MasterInvert: Yes
Tags DB Only: No
MatchCase: No WholeWords: No Invert: No
IgnoreDiacritics: No Path: Yes FindHidden: No
Search Path: N:\
NOTE: If I do a similar regexp search like the one above, but for the "[incomplete]" search, that works:
>\)\s*\[incomplete\]$ /d /P
The parsed result is:
Parsed: RegEx[\)\s*\[incomplete\]$]
The difference here is there is no escaped back-slash since I'm not looking for a subfolder.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 27 Mar 2021 19:10
by admin
Something weird is going on. I got it working sometimes (proof screenshot below). Then it stopped working forever. Even after restarting the app. RegExp bug?
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 27 Mar 2021 20:19
by Jerry
admin wrote: ↑27 Mar 2021 19:10
Something weird is going on. I got it working sometimes (proof screenshot below). Then it stopped working forever. Even after restarting the app. RegExp bug?
Yes, I am observing this weirdness as well. I put together the following reproducible situation using xyplorer /fresh, in case this provides a clue or useful debugging example:
I have the test folder structure below, shown in branched view:
Clipboard-20210327-02.png
1. I do a Quick Search for
>\)\\AltRip$ /P, and get no results.
2. I then use Find Files to do a
Standard search for
\)\\AltRip$,and get no results (as expected)
Clipboard-20210327-03.png
3. I do the Quick Search again as in #1, and
now I get results:
Clipboard-20210327-04.png
BUT NOTE: The results I get in Step #3, are actually not correct. It should have also returned the files a and b.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 28 Mar 2021 11:36
by admin
Bingo, that helped!
Jerry wrote: ↑27 Mar 2021 20:19
BUT NOTE: The results I get in Step #3, are actually not correct. It should have also returned the files a and b.

I don't understand. (No RegExp man)
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 28 Mar 2021 14:07
by Jerry
admin wrote: ↑28 Mar 2021 11:36
Jerry wrote: ↑27 Mar 2021 20:19
BUT NOTE: The results I get in Step #3, are actually not correct. It should have also returned the files a and b.

I don't understand. (No RegExp man)
Actually, since the path pattern does not match against any terminal filename portion, I guess the two files should not be returned. I am not expecting that behavior for my particular purposes. However, generally, and especially in the context of Find Files, where you have the types dropdown in the Name panel, it seems like other users
would expect the files to be returned. Perhaps the Types dropdown should be disabled when the Path option is checked to avoid confusion, since nothing you select there would ever change the results when matching against the path, exclusive of the filename.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 28 Mar 2021 14:15
by admin
I cannot help you with RegExp but a standard pattern like *)\AltRip\* would return files and be sensitive to the Types dropdown.
Re: 21.60.0104 - Quick Search Not Working As Before With Escaped Characters
Posted: 28 Mar 2021 14:39
by Jerry
admin wrote: ↑28 Mar 2021 14:15
I cannot help you with RegExp but a standard pattern like
*)\AltRip\* would return files and be sensitive to the Types dropdown.
Ah, right! Ok, never mind that point.
On another search-related note - I am seeing problematic search behavior in my custom configuration that I can't reproduce using a /fresh instance, and was wondering what I might have in my configuration that is causing this. (Just if you might have something to suggest off-hand.) Specifically:
- Any Quick Search pattern I do gets put into the Find Files panel, and then the next subsequent Quick Search automatically picks those settings up, without my requesting that with the magnifier button on the QS popup. I have to reset the Find Files search settings to get the Quick Search to work right.
- When using a cloned instance of XYplorer and doing separate searches there with a fixed Search Results tab, the results get switched at times to the search results in the source instance.