Anime regex, looking for feedback - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: Anime regex, looking for feedback (/showthread.php?tid=94114) |
Anime regex, looking for feedback - SNES350 - 2011-02-13 I came up with a complete regex for all of the anime file names that I have come across, and want to see how it works for others. It finds everything that I have thrown at it. My concern is false positives; I have not had any but my library is small. Code: [ _-](?:ep|e)?(\d{2,3})(?:[\-\d{2,3}])?[ _-]?(?:[\[]?[\.]?[v][\d][\]]?)?[\da-z ',\!\._-]*(?:[\[\(\{][a-z\d \.,_-]+[\]\)\}][ _-]*)*[\da-z ,_-]*\.(?!.*[\\/].*) - seer_tenedos - 2011-03-27 I have given your regex a good test on my collection and i only found one case that it gives an incorrect response for. You handle everything but double eps like the one below. [DB]_Naruto_116-117_[D8DA96AB].avi Apart from that it seems to work correctly for all my other files and cases. I would be very interested in a version that supports the double eps as well. keep up the great work. also a little unrelated but is there a regex to extract the name of anime as well as the ep in different groups? I am using the regex for something else and it would have been perfect if it also extracted show name with all the junk removed. Chris |