Page 1 of 1

How do you find only names with one dot?

Posted: Sun Dec 09, 2018 9:36 am
by Debugger
How do you find only names with one dot?
E.g. file name:

Code: Select all

.

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

Posted: Sun Dec 09, 2018 10:16 am
by void
regex:^[^\.]*\.[^\.]*$

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

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

Posted: Sun Dec 09, 2018 2:05 pm
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

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

Posted: Sun Dec 09, 2018 2:09 pm
by void
Please try:
^[^\.]*\.[^\.]*\.[^\.]*$

This will match one dot (.) in the name part and one dot (.) for the extension.

Alternately, please try:
*.*.* !*.*.*.*

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

Posted: Sun Dec 09, 2018 2:21 pm
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

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

Posted: Sun Dec 09, 2018 2:26 pm
by void
Do you have regex enabled under the Search menu?

Please try disabling Regex under the search menu and searching for:
regex:^[^\.]*\.[^\.]*\.[^\.]*$

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

Posted: Sun Dec 09, 2018 2:29 pm
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

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

Posted: Sun Dec 09, 2018 2:33 pm
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".

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

Posted: Sun Dec 09, 2018 2:38 pm
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

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

Posted: Sun Dec 09, 2018 2:42 pm
by void
Sorry for the misunderstanding, please try:
regex:^\.\.[^\.]*$

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

Posted: Sun Dec 09, 2018 2:46 pm
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.

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

Posted: Sun Dec 09, 2018 3:01 pm
by ovg
^[^.]*\.[^.]*$

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

Posted: Sun Dec 09, 2018 3:05 pm
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:
.

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

Posted: Sun Dec 09, 2018 3:13 pm
by ovg
^\.$

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

Posted: Sun Dec 09, 2018 3:21 pm
by Debugger

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

Posted: Sun Dec 09, 2018 4:02 pm
by vanisk
regex:^\.\.\S\S?\S?\S?$
dot and 4 char extension.jpg
dot and 4 char extension.jpg (16.01 KiB) Viewed 12745 times

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

Posted: Sun Dec 09, 2018 4:14 pm
by Debugger
@vanisk Thank You. Your regex 100% work! :)

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

Posted: Sun Dec 09, 2018 5:43 pm
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.

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

Posted: Sun Dec 09, 2018 6:44 pm
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.

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

Posted: Thu Dec 13, 2018 4:10 am
by therube
void wrote: exact:
Where did that come from?

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

Posted: Thu Dec 13, 2018 6:34 am
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.