2013-06-08, 19:24
Hello
I have issues with some regular expressions that are used for recognition of season and episode numbers from TV series.
An expression that works fine within a standalone RegEx checker fail in XBMC. I decided to build XBMC to debug the complete handling.
Due to the investigation I found the rootcause in the AdvancedSettings.cpp in the code that reads the expression from the XML file.
After the expression is read from XML in the method GetCustomTVRegexps [line: 1193] the following code is executed:
This is not very good for regular expression as e.g. (\d+) means something different than (\D+). Some of my expressions fail because of this. I would suggest to remove the MakeLower() call from this method.
If nobody objects I would like to create an official bug in TRAC and I would be also willing to fix it. Its a very small fix, so if anybody works on that file it would be nice to just fix it as well
Thanks.
I have issues with some regular expressions that are used for recognition of season and episode numbers from TV series.
An expression that works fine within a standalone RegEx checker fail in XBMC. I decided to build XBMC to debug the complete handling.
Due to the investigation I found the rootcause in the AdvancedSettings.cpp in the code that reads the expression from the XML file.
After the expression is read from XML in the method GetCustomTVRegexps [line: 1193] the following code is executed:
Code:
CStdString regExp = pRegExp->FirstChild()->Value();
regExp.MakeLower();
This is not very good for regular expression as e.g. (\d+) means something different than (\D+). Some of my expressions fail because of this. I would suggest to remove the MakeLower() call from this method.
If nobody objects I would like to create an official bug in TRAC and I would be also willing to fix it. Its a very small fix, so if anybody works on that file it would be nice to just fix it as well
Thanks.