Hi
I've tried to find files like
"test123 .txt".
But my Regex finds also files like
"test 123.txt" or
"test 123 .txt"
It looks like:
\s(?=[^.]*\.[^.]*$)
Whats the Trick?
best regards
Martin
Searching Filenames witch Space before Extension
-
data
- Posts: 30
- Joined: Sat Jun 17, 2017 8:17 am
-
therube
- Posts: 5727
- Joined: Thu Sep 03, 2009 6:48 pm
Re: Searching Filenames witch Space before Extension
Might not be full-proof, but...
find anything
up to a space
followed by a "dot" (.)
ending with 1 to 3 characters
(some extensions may be more then 3)
regex:.*\s\..{1,3}$find anything
up to a space
followed by a "dot" (.)
ending with 1 to 3 characters
(some extensions may be more then 3)
-
NotNull
- Posts: 5961
- Joined: Wed May 24, 2017 9:22 pm
Re: Searching Filenames witch Space before Extension
Loose the first [^.] as that will search for any file/foldername that contaains a space anywhere in the stem:
Code: Select all
regex:"\s(?=\.[^.]*$)"Somewhat simpler:
Everything 1.4:
Code: Select all
file: regex:" \.[^.]+$"Code: Select all
endwith:stem:" "(If you are running version 1.5, please post in the Everything 1.5 Alpha forum as answers can be quite different for each version as you cna see above)
-
data
- Posts: 30
- Joined: Sat Jun 17, 2017 8:17 am
Re: Searching Filenames witch Space before Extension
Great solutions.
Best of is using this one for V1.5
endwith:stem:" "
Thanks a lot