Alt+F7 problem if dot in search string
Alt+F7 problem if dot in search string
Alt+F7 search results are missing if there is a dot in the search string and the search string is not within asterisks.
Example: A file named "a.b.c.d.txt" is found by the input
*b.c*
but not by the input
b.c
like a file named "a-b-c-d.txt" is found by the input
b-c
Input of
"b.c"
causes the error message "File mask is syntactically incorrect."
Example: A file named "a.b.c.d.txt" is found by the input
*b.c*
but not by the input
b.c
like a file named "a-b-c-d.txt" is found by the input
b-c
Input of
"b.c"
causes the error message "File mask is syntactically incorrect."
Re: Alt+F7 problem if dot in search string
That's not actually a problem, if you know what to expect.TÜV wrote:Alt+F7 search results are missing if there is a dot in the search string and the search string is not within asterisks.
Find primarily looks for exact matches, that's the reason why 'b.c' doesn't find 'a.b.c.d.txt'. It also considers any wildcards entered (* and ?), so that '*b.c*' does find 'a.b.c.d.txt'.TÜV wrote:Example: A file named "a.b.c.d.txt" is found by the input *b.c* but not by the input b.c like a file named "a-b-c-d.txt" is found by the input b-c
For simplicity's sake, if you enter search term that doesn't look as an actual filename, i.e. it doesn't contain any dots, the term is automagically enclosed by asterisks. You can see that if you perform a more time expensive search (e.g. for 'abc' on C:) and look at the title of the Find window. That works as a substring search - finds everything that contains the search term (not just those that are named the same).
Quotation marks (") are not allowed in file names.TÜV wrote:Input of "b.c" causes the error message "File mask is syntactically incorrect."
Ελληνικά rulez.
-
- ALTAP Staff
- Posts: 1112
- Joined: 08 Dec 2005, 09:13
- Location: Novy Bor, Czech Republic
- Contact:
Re: Alt+F7 problem if dot in search string
This is explained in Help (press F1 key in Find dialog) for Named box:
Important note: when you specify mask without asterisk (*), question mark (?), and point (.), you will find all files and directories whose names are containing this mask (e.g. when you specify "dog", you will find "dogs.txt", "hotdog.jpg", etc.), you can prevent this by adding point (.) to the end of such mask (e.g. when you specify "dog.", you will find only "dog").
Important note: when you specify mask without asterisk (*), question mark (?), and point (.), you will find all files and directories whose names are containing this mask (e.g. when you specify "dog", you will find "dogs.txt", "hotdog.jpg", etc.), you can prevent this by adding point (.) to the end of such mask (e.g. when you specify "dog.", you will find only "dog").
search string syntax
I used the F1 Help Index on
At the moment
before posting the problem. There it says:Regular Expressions Syntax
andAltap Salamander uses this library to match regular expressions.
In this help text a hint is missing that for Alt+F7 a different syntax is valid which can be found at'.' - matches any single character (for example, 'do.' matches 'dog', 'dot', 'doe', etc.; 'd..r' matches 'door', 'deer', etc.)
.File Masks
should be added in the Help Index.File Masks
At the moment
is only a link insideFile Masks
.Find
-
- ALTAP Staff
- Posts: 5231
- Joined: 08 Dec 2005, 06:34
- Location: Novy Bor, Czech Republic
- Contact:
Re: Alt+F7 problem if dot in search string
Regular expressions are used for Search file content (try to clear the Search file content option to see dependent options) in the Find dialog box.
The Named field has nothing to do with regular expression. When you press F1 in the Find dialog box, you will see:
The Named field has nothing to do with regular expression. When you press F1 in the Find dialog box, you will see:
Re: Alt+F7 problem if dot in search string
It says "adding point at the end of the mask" but in fact the substring search seems to be prohibited if there is a point in the mask at any position.
Re: Alt+F7 problem if dot in search string
Exactly: "when you specify mask without asterisk (*), question mark (?), and point (.), you will find all files ... containing this mask". But when you specify a mask WITH an *, ? or ., you will only find exact matches, i.e. no asterisks are added automatically.
I can understand this confuses you at first. Look at the Find window caption to see what happens.
I can understand this confuses you at first. Look at the Find window caption to see what happens.
Groente, Michel.
Re: Alt+F7 problem if dot in search string
If you want to use substring search, enclose the search term with asterisks - that's the correct way and will work regardless of dots.
Ελληνικά rulez.
Re: Alt+F7 problem if dot in search string
What is this feature good for other than to confuse unsuspecting users like me?
Re: Alt+F7 problem if dot in search string
In theory, you should know that if you want to use substring search, then you have to use asterisks. But Windows breaks that theory, because IIRC it uses substring search by default. To avoid possible confusion as to why Salamander doesn't/can't search for files in a similar manner, a simplification was made, so that if a simple query (no dots or wildcards) is entered in Salamander's Find, a substring search is performed.SvA wrote:What is this feature good for other than to confuse unsuspecting users like me?
Ελληνικά rulez.
-
- ALTAP Staff
- Posts: 5231
- Joined: 08 Dec 2005, 06:34
- Location: Novy Bor, Czech Republic
- Contact:
Re: Alt+F7 problem if dot in search string
Exactly, it was a very requested feature from people coming from Windows Find.