Off-topic posts of interest to the "Everything" community.
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 9:36 am
How do you find only names with one dot?
E.g. file name:
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Sun Dec 09, 2018 10:16 am
regex:^[^\.]*\.[^\.]*$
Alternatively, without regex:
*.* !*.*.*
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 2:05 pm
void wrote: ↑ Sun Dec 09, 2018 10:16 am
regex:^[^\.]*\.[^\.]*$
Alternatively, without regex:
*.* !*.*.*
NOT WORK:
^[^\.]*\.[^\.]*$
NOT WORK:
*.* !*.*.*
NOT WORK
^\.$
NOT WORK:
\\.[^\\.]*$
Mini-example PATH:
C:\Users\M\Documents\..csv
NOT FOUND => NOT WORK
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Sun Dec 09, 2018 2:09 pm
Please try:
^[^\.]*\.[^\.]*\.[^\.]*$
This will match one dot (.) in the name part and one dot (.) for the extension.
Alternately, please try:
*.*.* !*.*.*.*
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 2:21 pm
void wrote: ↑ Sun Dec 09, 2018 2:09 pm
Please try:
^[^\.]*\.[^\.]*\.[^\.]*$
This will match one dot (.) in the name part and one dot (.) for the extension.
Alternately, please try:
*.*.* !*.*.*.*
I tested regular expressions, first and second:
It does not show one dot, only other names, so bad.
I still do not know the correct regular expression.
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Sun Dec 09, 2018 2:26 pm
Do you have regex enabled under the Search menu?
Please try disabling Regex under the search menu and searching for:
regex:^[^\.]*\.[^\.]*\.[^\.]*$
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 2:29 pm
void wrote: ↑ Sun Dec 09, 2018 2:26 pm
Do you have regex enabled under the Search menu?
Please try disabling Regex under the search menu and searching for:
regex:^[^\.]*\.[^\.]*\.[^\.]*$
Regex wrong.
I have turned off the regex, it
still does not find the name as one dot.
Example
. .ext
See screenshot:
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Sun Dec 09, 2018 2:33 pm
To search for filenames with only one dot (and nothing else), please try:
regex:^\.$
Alternatively, without regex:
exact:.
This shouldn't match anything as the filename . is not valid on Windows.
It is reserved for "Current directory".
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 2:38 pm
^\.$
I have tested it already - it does not work. All regex always not work.
example path:
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Sun Dec 09, 2018 2:42 pm
Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 2:46 pm
void wrote: ↑ Sun Dec 09, 2018 2:42 pm
Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$
Still not work / wrong search
See screenshot:
regex works only in the Text Editor, it does not work in the EVERYTHING tool and MASTER SEEKER. I need a correct regex, working with both applications.
ovg
Posts: 294 Joined: Thu Oct 27, 2016 7:19 pm
Post
by ovg » Sun Dec 09, 2018 3:01 pm
^[^.]*\.[^.]*$
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 3:05 pm
ovg wrote: ↑ Sun Dec 09, 2018 3:01 pm ^[^.]*\.[^.]*$
Your regex is completely incorrect. Why? Because it finds most of the file names, and I want to find only the name dot
Filename:
.
ovg
Posts: 294 Joined: Thu Oct 27, 2016 7:19 pm
Post
by ovg » Sun Dec 09, 2018 3:13 pm
^\.$
vanisk
Posts: 152 Joined: Sat Oct 27, 2018 11:33 am
Post
by vanisk » Sun Dec 09, 2018 4:02 pm
regex:^\.\.\S\S?\S?\S?$
dot and 4 char extension.jpg (16.01 KiB) Viewed 14487 times
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 4:14 pm
@vanisk Thank You. Your regex 100% work!
vanisk
Posts: 152 Joined: Sat Oct 27, 2018 11:33 am
Post
by vanisk » Sun Dec 09, 2018 5:43 pm
Yw. But credit goes to @void as well (as i got the idea from void's answer and tweaked it).
Technically, regex:^\.\.[^\.]*$ is correct.
one dot for filename, one dot for file-and-extension-separation and the rest for extension.
I tweaked it for a max of 4 character (with atleast 1 char) in extension part.
Debugger
Posts: 630 Joined: Thu Jan 26, 2017 11:56 am
Post
by Debugger » Sun Dec 09, 2018 6:44 pm
vanisk wrote: ↑ Sun Dec 09, 2018 5:43 pm
Yw. But credit goes to @void as well (as i got the idea from void's answer and tweaked it).
Technically,
regex:^\.\.[^\.]*$ is correct.
one dot for filename, one dot for file-and-extension-separation and the rest for extension.
I tweaked it for a max of 4 character (with atleast 1 char) in extension part.
Regex searches for the expected name in the form of a dot,
but also looks up the folder name, which is unexpected in this case.
Code: Select all
^\.\.[^\.]*$
Find:
..%5CDoc%5CBahamas%5CPostage
Extension Type: File folder
Regex
vanisk fully solves this problem because it is looking for typical extensions.
therube
Posts: 4967 Joined: Thu Sep 03, 2009 6:48 pm
Post
by therube » Thu Dec 13, 2018 4:10 am
void wrote: exact:
Where did that come from?
void
Developer
Posts: 16698 Joined: Fri Oct 16, 2009 11:31 pm
Post
by void » Thu Dec 13, 2018 6:34 am
exact: doesn't appear to be documented anywhere. Anyhow, exact: is the same as wfn: or whole-file-name: or wholefilename:
I'll add exact: to the Everything search syntax help.