Usually people ask specific questions and get a specific answer. I thought I might start throwing out some examples of my own use with explanations that people can copy or use themselves.
Here's a quick one: I like lossless music, so I hit the lossless groups quite a bit. Fortunately they aren't nearly as spammed and corrupted as some of the other binary groups, but just to be on the safe side I always include a rule to ignore non-word characters before the file extension. Anyway, here's my lossless filter. I include some picture extensions to grab the album art if available. I wouldn't use this filter in a say, multimedia group where I'm looking for movie files.
I've thrown in a comment and included the tree view so you can follow the logic of the expressions. We can get into backreferences and capture groups another time. Honestly, I don't know if there is support for those in newsbin, but they are useful in other apps anyway.
Hope it helps. Gaijin
Will match:
<filename>.rar
<filename>1.rar
<filename>%.rar
<filename>.gif
<filename>.ape
<filename>.flac
<filename>.zip
<filename>.jpeg
<filename>.jpg
won't match
<filename>1. rar
<filename> .rar
<filename>jpg
<filename>gif
<filename>flac
<filename>. flac
<filename> .flac
Ignore non-word characters before file extensions
[^\s]\.(par2|nfo|gif|jpe?g|ape|flac|zip|txt|[r-z][a0-9][r0-9])
- Match any character that is NOT a "A whitespace character (spaces, tabs, line breaks, etc.)"
- Match the character "." literally
- Match the regular expression below and capture its match into backreference number 1
- Match either the regular expression below (attempting the next alternative only if this one fails)
- Or match regular expression number 2 below (attempting the next alternative only if this one fails)
- Match the characters "nfo" literally
- Or match regular expression number 3 below (attempting the next alternative only if this one fails)
- Match the characters "gif" literally
- Or match regular expression number 4 below (attempting the next alternative only if this one fails)
- Match the characters "jp" literally
- Match the character "e" literally
- Between zero and one times, as many times as possible, giving back as needed (greedy)
- Match the character "g" literally
- Match the character "e" literally
- Or match regular expression number 5 below (attempting the next alternative only if this one fails)
- Match the characters "ape" literally
- Or match regular expression number 6 below (attempting the next alternative only if this one fails)
- Match the characters "flac" literally
- Or match regular expression number 7 below (attempting the next alternative only if this one fails)
- Match the characters "zip" literally
- Or match regular expression number 8 below (attempting the next alternative only if this one fails)
- Match the characters "txt" literally
- Or match regular expression number 9 below (the entire group fails if this one fails to match)
- Match a single character in the range between "r" and "z"
- Match a single character present in the list below
- The character "a"
- A character in the range between "0" and "9"
- Match a single character present in the list below
- The character "r"
- A character in the range between "0" and "9"
- Match a single character present in the list below
- Match the characters "par2" literally
- Or match regular expression number 2 below (attempting the next alternative only if this one fails)