2010-11-09, 11:44
Buttink Wrote:Your right ... renaming blows (I did make an app for that). But, I found out that (?: ) is a group that isnt captured .... I feel retarded.
HERE is a super specific anime regex that is kind long winded just for my own clarity.
Code:(?:[/\\]season[^\w]?(\d{1,2})[^\d]*)?[/\\]\[.+?\].*?(?:[\. _-]|ep)(\d{1,3})(?:v\d+)?[\. _-](?:[[({].*?[])}])*?(?:[[({][\da-z]{8}[])}])?
It basically first checks to see if there is a "/Season ##" and if there isn't we don't care because group 1 can be null. I'm not entirely positive this works with XBMC because i have been using external regex testers for this. So, I don't know if group not found is the same as a group with no text. Then, you look for the [SUBGROUP]. After that, the name of the show we dont really care about so we just go to "- ##" and see if there is a "v#" after. After that, just searching for matching [({ with the last one being the CRC32. Granted with the matching [({ and making the CRC32 optional, the CRC32 group itself is redundant but eh whatever.
The only problem I see with this is someone trying to be cute and putting ((TEXT)) or something like that.
Looks interesting. Remember a CRC can only be 0-9a-f so that would make it even more specific. Will give it more attention after the hangover leaves my head