How to filter files beginning with...

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

How to filter files beginning with...

Postby robwood » Tue Aug 06, 2002 2:47 pm

What do I need to type in the File Filter to reject all files beginning with a certain string, but containing a few characters before the extension? I have aatempted to read and implement some of the examples in the help, but to no avail.

For example, how would I filter...

mickeymo001-1.jpg
mickeymo003-6.jpg etc etc
robwood
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Jul 23, 2002 9:24 am

Registered Newsbin User since: 04/02/03

RE: How to filter files beginning with...

Postby shaklee3 » Tue Aug 06, 2002 5:57 pm

mickeymo[-0-9]+\.jpg
shaklee3
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Fri Aug 02, 2002 8:48 pm

RE: How to filter files beginning with...

Postby Quade » Tue Aug 06, 2002 7:16 pm

I think he needs a tag to make it match the beginning of the line. I think it's a charet

"^mickey" should match all filenames starting with Mickey but not match embedded mickeys.

Dexter, jump in here and correct me.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44867
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

RE: How to filter files beginning with...

Postby shaklee3 » Tue Aug 06, 2002 9:18 pm

yes, thats right, I misread him. Try:

^mickeymo[-0-9]+\.jpg
shaklee3
Occasional Contributor
Occasional Contributor
 
Posts: 12
Joined: Fri Aug 02, 2002 8:48 pm

RE: How to filter files beginning with...

Postby dexter » Tue Aug 06, 2002 10:08 pm

How about that? Another RegEx guy. Yes, that's the way I would do it, too.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9511
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests