Figured I would post a few.

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Figured I would post a few.

Postby RevRagnarok » Wed Feb 25, 2009 11:31 pm

If I have a lot in my download tab and want to percolate certain files to the top, I use this expression:

\.par|nfo|gif|jpe?g|\.txt

Then just click "FIND" and "TOP"

However, on my scratch list I wouldn't want that because I don't want to download all the par2 files by accident. For that, you use a negative look-behind:

(?<!\d)\.par|nfo|gif|jpe?g|\.txt

Which matches all the base par2 files but not the fill files (unless the base for some reason has a number there, you can't win them all!)

;)
User avatar
RevRagnarok
Occasional Contributor
Occasional Contributor
 
Posts: 35
Joined: Thu Oct 20, 2005 8:18 am

Registered Newsbin User since: 10/20/05

Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests