EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Set Selection: how-to use regex within "%d=" flag?  (Read 9051 times)

yescabernetnointernet

  • "And the wind screams Mary"
  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 70
  • RED is for WINE
  • Operating System:
  • Linux Linux
  • Browser:
  • Firefox 83.0 Firefox 83.0
    • View Profile
Set Selection: how-to use regex within "%d=" flag?
« 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/
« Last Edit: 14 December 2020, 19:40 by yescabernetnointernet »
Logged


Lo stalker portò scrittore e professore nella Zona...

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3423
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 87.0.4280.88 Chrome 87.0.4280.88
    • View Profile
Re: Set Selection: how-to use regex within "%d=" flag?
« Reply #1 on: 15 December 2020, 06:23 »

%d=*Japan*
Logged

yescabernetnointernet

  • "And the wind screams Mary"
  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 70
  • RED is for WINE
  • Operating System:
  • Linux Linux
  • Browser:
  • Firefox 83.0 Firefox 83.0
    • View Profile
Re: Set Selection: how-to use regex within "%d=" flag?
« Reply #2 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
Logged
Lo stalker portò scrittore e professore nella Zona...

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3423
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 87.0.4280.88 Chrome 87.0.4280.88
    • View Profile
Re: Set Selection: how-to use regex within "%d=" flag?
« Reply #3 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)".
Logged

yescabernetnointernet

  • "And the wind screams Mary"
  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 70
  • RED is for WINE
  • Operating System:
  • Linux Linux
  • Browser:
  • Firefox 83.0 Firefox 83.0
    • View Profile
Re: Set Selection: how-to use regex within "%d=" flag?
« Reply #4 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?
Logged
Lo stalker portò scrittore e professore nella Zona...

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3423
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 87.0.4280.88 Chrome 87.0.4280.88
    • View Profile
Re: Set Selection: how-to use regex within "%d=" flag?
« Reply #5 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...... :-(
Logged
Pages: [1]   Go Up
 

Page created in 0.077 seconds with 21 queries.