How do you find only names with one dot?

Off-topic posts of interest to the "Everything" community.
Post Reply
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

How do you find only names with one dot?

Post by Debugger »

How do you find only names with one dot?
E.g. file name:

Code: Select all

.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

regex:^[^\.]*\.[^\.]*$

Alternatively, without regex:
*.* !*.*.*
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: How do you find only names with one dot?

Post by Debugger »

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: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

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

Re: How do you find only names with one dot?

Post by Debugger »

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.

Image
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

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

Re: How do you find only names with one dot?

Post by Debugger »

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:

Image
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

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

Re: How do you find only names with one dot?

Post by Debugger »

^\.$
I have tested it already - it does not work. All regex always not work.

example path:

Code: Select all

C:\Users\OJ\Documents\..csv
Image
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: How do you find only names with one dot?

Post by Debugger »

void wrote: Sun Dec 09, 2018 2:42 pm Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$
Still not work / wrong search
See screenshot:
Image


Code: Select all

[^\\/]*\.[^\.]*$
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

Re: How do you find only names with one dot?

Post by ovg »

^[^.]*\.[^.]*$
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: How do you find only names with one dot?

Post by Debugger »

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

Re: How do you find only names with one dot?

Post by ovg »

^\.$
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: How do you find only names with one dot?

Post by Debugger »

vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: How do you find only names with one dot?

Post by vanisk »

regex:^\.\.\S\S?\S?\S?$
dot and 4 char extension.jpg
dot and 4 char extension.jpg (16.01 KiB) Viewed 14463 times
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: How do you find only names with one dot?

Post by Debugger »

@vanisk Thank You. Your regex 100% work! :)
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: How do you find only names with one dot?

Post by vanisk »

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

Re: How do you find only names with one dot?

Post by Debugger »

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: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: How do you find only names with one dot?

Post by therube »

void wrote: exact:
Where did that come from?
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: How do you find only names with one dot?

Post by void »

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.
Post Reply