blog: wildcards 101

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
nikos
Site Admin
Site Admin
Posts: 15794
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

blog: wildcards 101

Post by nikos »

here's the comment area for today's blog post found at
https://www.zabkat.com/blog/filename-filtering.htm
User avatar
pschroeter
Silver Member
Silver Member
Posts: 283
Joined: 2007 Jan 27, 00:46

Re: blog: wildcards 101

Post by pschroeter »

Is there a wildcard for a single digit (and single character)? When I download images from the Internet with Firefox with names like "203344251_355840562566401_5108092898173595155_n." I would like to find these, and I figure just screening for file names that start with nine digits will do it. I confess this is an intellectual exercise because they aren't hard to find with my eyeballs, it just feels like Find file should do it.
Yes I imagine Regex can do this, but learning how is a pain, and every time I do learn, I won't remember how I did it the next time I need it.
User avatar
nikos
Site Admin
Site Admin
Posts: 15794
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: blog: wildcards 101

Post by nikos »

for that you are best off with a regular expression [0-9] and a repeat count. Sorry I am no regexp guru but it is definitely doable
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Re: blog: wildcards 101

Post by Robert2 »

If I go to regex101: build, test, and debug regex, and test the following regex syntax:

Code: Select all

^\d{9}_
I get results:
Image

If I try the same regex syntax in xplorer², I get no results.
It would be helpful to have a complete description of the regex syntax available in xplorer².
Tuxman
Platinum Member
Platinum Member
Posts: 1610
Joined: 2009 Aug 19, 07:49

Re: blog: wildcards 101

Post by Tuxman »

I wish that not every single tool on this planet came with its own regex syntax.

Maybe ^\\d{9} works? (I*m not on an x²-enabled PC right now, surprisingly.)
Tux. ; tuxproject.de
registered xplorer² pro user since Oct 2009, ultimated in Mar 2012
User avatar
nikos
Site Admin
Site Admin
Posts: 15794
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: blog: wildcards 101

Post by nikos »

I just tried it and ^\d{8}_ seems to work!?
make sure you enable regular expressions in x2 setting the fuzzy box to 0 (next to NAMED box)
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Re: blog: wildcards 101

Post by Robert2 »

My bad! Sorry! I forgot to set the fuzzy box to 0!
^\d{9}_ does work!
Post Reply