Finding folder names - regex puzzle

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Finding folder names - regex puzzle

Post by Papoulka »

XY Ver. 15.10.0002 // Find Files | Name & Location // Mode: RegExp

I'm trying to find folders with names that contain two digits separated by a comma and a space eg: "reports 1, 2 from fall"

When I use this regex:
([0-9])(, )([0-9])
or this one:
([0-9])(,)(\ )([0-9])
XY finds all files with this criterion, but no folders.

If I remove the space in the regex:
([0-9])(,)([0-9])
XY finds all files and folders that have digits separated only by a comma, as expected.

Any idea why the first regex above (with the space) works with files but not with folders? Bug, or something I'm missing?

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

Re: Finding folder names - regex puzzle

Post by highend »

Your first two regexes find folders as well. At least for me... Maybe you've ticked something else. Reset your filter (by clicking on that button) and just try it again.

Btw,
\d, \d
Is a bit easier as a pattern (and less to type)
One of my scripts helped you out? Please donate via Paypal

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: Finding folder names - regex puzzle

Post by Papoulka »

:oops: Operator error, as we say... There weren't any such folders to find. Very sorry to waste your time. Thanks again for your help.

Post Reply