Hi,
I am using 1.4.1.1002 version and via Everything SDK, calling API Everything_SetRegex in my program.
I have some files in c:\test\ folder in my device.
Case 1:
Everything_SetRegex(TRUE);
Everything_SetSearch("c:\\test\\*");
Everything_Query(TRUE);
-> doesnt return any results
Case 2:
Everything_SetRegex(FALSE);
Everything_SetSearch("c:\\test\\*");
Everything_Query(TRUE);
-> returns list of files in results
Question: Everything_SetRegex(TRUE) should enable regex and we should get results with wildcard search but in my case Everything_SetRegex(FALSE) is doing the wildcard searches.
Am I missing something?
Everything_SetRegex
Re: Everything_SetRegex
From the Everything regex help:
So you are searching for multiple \\\\* Matches the preceding element zero or more times
Try this instead:
Code: Select all
Everything_SetSearch("c:\\test\\");
Code: Select all
Everything_SetSearch("c:\\test\\.*");
Re: Everything_SetRegex
Thanks for the reply.
Everything_SetSearch("c:\\test\\");
with Everything_SetRegex(TRUE) -> didnt return anything
Everything_SetSearch("c:\\test\\");
with Everything_SetRegex(FALSE) -> returned files list
Everything_SetSearch("c:\\test\\.*");
-> doesnt return any list with both Everything_SetRegex(TRUE) OR Everything_SetRegex(FALSE)
Everything_SetSearch("c:\\test\\");
with Everything_SetRegex(TRUE) -> didnt return anything
Everything_SetSearch("c:\\test\\");
with Everything_SetRegex(FALSE) -> returned files list
Everything_SetSearch("c:\\test\\.*");
-> doesnt return any list with both Everything_SetRegex(TRUE) OR Everything_SetRegex(FALSE)
Re: Everything_SetRegex
Ah, I see : a \ is already specified as \\
In that case. doubling them should do the trick:
(as you might have noticed, I have no prior experience with the SDK functions )
In that case. doubling them should do the trick:
Code: Select all
Everything_SetSearch("c:\\\\test\\\\");
Everything_SetSearch("c:\\\\test\\\\.*");
(as you might have noticed, I have no prior experience with the SDK functions )
Re: Everything_SetRegex
Thanks for the reply.
The problem is not with slashes. The problem is with using wildcard in search string.
Using a wildcard in search string returns results when I have set Everything_SetRegex(FALSE)
Using a wildcard in search string DOESNT returns results when I have set Everything_SetRegex(TRUE) --> ideally this should have enabled regex search but it didnt.
The problem is not with slashes. The problem is with using wildcard in search string.
Using a wildcard in search string returns results when I have set Everything_SetRegex(FALSE)
Using a wildcard in search string DOESNT returns results when I have set Everything_SetRegex(TRUE) --> ideally this should have enabled regex search but it didnt.
Re: Everything_SetRegex
A Windows wildcard (if you will) is, .
- match any sequence of characters
A RegEx wildcard (if you will) is,.
- match any character zero or more times
So the wildcards you specify (* or .*) need to match how you're searching ("Windows" or RegEx).
*
- match any sequence of characters
A RegEx wildcard (if you will) is,
.*
- match any character
.
*
So the wildcards you specify (* or .*) need to match how you're searching ("Windows" or RegEx).