EMULAB Forum

clrmamepro [English] => clrmame Discussion => Topic started by: yescabernetnointernet on 14 December 2020, 19:38

Title: Set Selection: how-to use regex within "%d=" flag?
Post by: yescabernetnointernet on 14 December 2020, 19:38
Hay Roman, I cannot select all sets with word "japan" inside their description definition inside the DAT file...
Will you please help me?

Here's regex:
Code: [Select]
\b(japan)
Am I missing something?

That's the DAT: http://redump.org/datfile/dc/
Title: Re: Set Selection: how-to use regex within "%d=" flag?
Post by: Roman on 15 December 2020, 06:23
%d=*Japan*
Title: Re: Set Selection: how-to use regex within "%d=" flag?
Post by: yescabernetnointernet on 15 December 2020, 21:01
OK, thanks.
Can you confirm I cannot use regexp inside one single declaration?
I mean the correct way would be, e.g.:
Code: [Select]
%d=foo;%d=boo;%d=moonot this way:
Code: [Select]
%d=\b(foo)|(boo)|(moo)
Just to clarify my thoughts
Title: Re: Set Selection: how-to use regex within "%d=" flag?
Post by: Roman on 16 December 2020, 07:04
It's not a full regular expression implementation (hell, that code is 20 years old...)
You can use something like:

%d=[0-9][0-9] W*;%d=*(rev A)

to enable sets which start with "2 decimals space W" (e.g. 18 Wheeler)
The ; separates like an OR. So in the example you additionally select sets with a description ending "(rev A)".
Title: Re: Set Selection: how-to use regex within "%d=" flag?
Post by: yescabernetnointernet on 16 December 2020, 11:45
(hell, that code is 20 years old...)
Eh eh... ;D The long living clrmamepro!!!
BTW, OK thanks.
I also discovered that the Logical NOT switch, changes the behavior from the OR (standard) to AND. Right?
Title: Re: Set Selection: how-to use regex within "%d=" flag?
Post by: Roman on 16 December 2020, 12:31
No, since it's not an NOT(A or B or C)...it's a NOT A or NOT B or NOT C
The not works on each sinlge part and actually this will usually end in something you don't expect.

not(sets starting with A); not(sets starting with B) -> this will still enable sets with A and B...... :-(