Release [MOD] AniDB.net scrapers for TV shows and Movies
So basically, the first step would be to figure out the common pattern(s) for each groups' releases, then you can adapt the ones in the first post to match them.

So the regexp:
Code:
<regexp> - ()(\d+)((?:-\d+)*)(?:v\d+)? - [^\\/]*$</regexp>
consists of four parts
" - "
"()(\d+)((?:-\d+)*)(?:v\d+)?"
" - "
"[^\\/]*$"
The second part does all the heavy lifting with the actual episode number, and the fourth part forces the match to only happen on the file name (and not a folder), so leave them intact. It's the first and third you need to change as they define the context of the number to match against.


Assuming all gg files match the pattern of your example, you have "_-_01_[" as the pattern to match (let's not complicate things by including the CRC in the pattern). So the first part of the regexp will be "_-_" and the third "_\[" (you need to escape square brackets).

Put it all back together and you get:
Code:
<regexp>_-_()(\d+)((?:-\d+)*)(?:v\d+)?_\[[^\\/]*$</regexp>

You can try to generalize to cover more groups in one regexp if you want, for example "[\. _]" will match against a period, space, or underscore, so "[\. _]-[\. _]" would match " - ", "_-_", ".-." (and also, e.g., "_-."), but the more you try to generalize the more potential there is for false positives, so be careful. It can be simpler to have multiple regexps each handling a specific case than trying to maintain one "super-regexp" that handles them all.
Reply


Messages In This Thread
RE: [RELEASE] [MOD] AniDB.net scrapers for TV shows and Movies - by scudlee - 2013-07-29, 09:35
RE: - by scudlee - 2013-10-12, 17:42
Logout Mark Read Team Forum Stats Members Help
[MOD] AniDB.net scrapers for TV shows and Movies8