How do you find only names with one dot?

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

How do you find only names with one dot?

Post by Debugger » Sun Dec 09, 2018 9:36 am

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

Code: Select all

.

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void » Sun Dec 09, 2018 10:16 am

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

Alternatively, without regex:
*.* !*.*.*

Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

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: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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.

Image

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

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: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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:

Image

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

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: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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:

Code: Select all

C:\Users\OJ\Documents\..csv
Image

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void » Sun Dec 09, 2018 2:42 pm

Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$

Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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:
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: 164
Joined: Thu Oct 27, 2016 7:19 pm

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

Post by ovg » Sun Dec 09, 2018 3:01 pm

^[^.]*\.[^.]*$

Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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: 164
Joined: Thu Oct 27, 2016 7:19 pm

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

Post by ovg » Sun Dec 09, 2018 3:13 pm

^\.$

Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

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

Post by Debugger » Sun Dec 09, 2018 3:21 pm


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

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

Post by vanisk » Sun Dec 09, 2018 4:02 pm

regex:^\.\.\S\S?\S?\S?$
dot and 4 char extension.jpg
You do not have the required permissions to view the files attached to this post.

Debugger
Posts: 525
Joined: Thu Jan 26, 2017 11:56 am

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

Post by Debugger » Sun Dec 09, 2018 4:14 pm

@vanisk Thank You. Your regex 100% work! :)

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

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

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: 525
Joined: Thu Jan 26, 2017 11:56 am

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

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

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

Post by therube » Thu Dec 13, 2018 4:10 am

void wrote: exact:
Where did that come from?

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

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

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.

Post Reply