[mythtv] Hacking on gamehandler.cpp in mythgame

Espen A. Fossen espenaf at junta.no
Sun May 16 16:54:12 UTC 2010


On 16.05.2010 18:05, Anthony Zawacki wrote:
> On 05/16/2010 05:45 AM, Espen A. Fossen wrote:
>> Hi
>>
>>
>>   QRegExp multiDiskRGXP = QRegExp( "[0-4]$", Qt::CaseSensitive,
>> QRegExp::RegExp);
>>
>> I have some Amiga games with more than 4 disks, so compensate for the
>> number of disks in edited the regex to handle up to 9 disks, like this.
>>
>>   QRegExp multiDiskRGXP = QRegExp( "[0-9]$", Qt::CaseSensitive,
>> QRegExp::RegExp);
> 
> I'm not a myth developer, but I'd try "\d+$" as the string and see if
> that addresses your issue of picking out numbers.  The up side is that
> it should support a hundred or a thousand disks  (someone still have
> Linux 0.97 that came on something like 125 disks if you included tex?!?)

That worked great. Looks like the {2} didn't work at all, can't see why
it shouldn't work. Is there some special escaping for this also? Had to
use an extra \ for the \d (\\d)


> 
>>   QRegExp multiDiskRGXP2 = QRegExp( "[0-9]{2}$", Qt::CaseSensitive,
>> QRegExp::RegExp);
>>
>> Then make a check for this before checking for romname with 1 digit
>> ending. The actual code looks like this:
> 
> I don't know if additional updates would be needed...  Sorry if I sent
> you off in the wrong direction...
> 
There are some additional issues to fix when matching more then one
digit, but that I can fix.

Thanks
Espen




More information about the mythtv-dev mailing list