Need help getting regex expression to work

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
zBernie
Posts: 181
Joined: 08 Dec 2016 17:20

Need help getting regex expression to work

Post 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

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Need help getting regex expression to work

Post 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}
One of my scripts helped you out? Please donate via Paypal

Post Reply