Page 1 of 1

Need help getting regex expression to work

Posted: 24 Nov 2018 20:12
by zBernie
In a directory if I do a quick search for -13.jpg I find the following files;

2016-08-19 09.25.37-13.jpg
2016-09-15 08.25.57-13.jpg
2016-09-15 08.25.58-13.jpg

I have numerous files that end in -nn.jpg which I need to search for. Using the following in the Find Files regex search does not work as expected:

>-[(0-9)(0-9).jpg]

I'm trying to come up with a regex that will find files ending in -13.jpg, -14.jpg, -15.jpg, etc.

-Thanks

Re: Need help getting regex expression to work

Posted: 24 Nov 2018 20:19
by highend

Code: Select all

>-\d+\.jpg$
Yes, this will find files like -1.jpg or -123.jpg as well (on purpose!). If you really only want to find two digit endings, replace the:
+
with either:
\d
or:
{2}