Author Topic: How to add filter rule [a]  (Read 5715 times)

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
How to add filter rule [a]
« on: January 20, 2019, 01:29:36 PM »
I have some "duplicated" names containing "[a]" ,  "[a2]" , "" ...

Tried:

Code: [Select]
|[a2]|[a3]|[t]
rule                 Name not_contains "[h CEZ]"
rule                 Name not_contains "[h MSX Games bOX]"
rule                 Name not_contains "[cr King Soft]"

But doesnt work.
How can I filter this names?

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: How to add filter rule [a]
« Reply #1 on: January 20, 2019, 01:58:14 PM »
[ & ] are special characters and must be escaped by a \.

Code: [Select]
rule                 Name not_contains \[a\]
rule                 Name not_contains \[a2\]
« Last Edit: January 20, 2019, 07:18:38 PM by progets »

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: How to add filter rule [a]
« Reply #2 on: January 21, 2019, 05:18:07 AM »
Thanks, now is working.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: How to add filter rule [a]
« Reply #3 on: January 24, 2019, 12:42:10 AM »
FWIW - You can also combine these into a single rule like this
Code: [Select]
rule                 Name not_contains \[a\]|\[a2\]

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: How to add filter rule [a]
« Reply #4 on: January 26, 2019, 04:19:23 AM »
Thanks again.
What about names like this?

Quote
Afteroids (1988)(Zigurat Software)(ES)

I want to include '(ES)' games only on a filter.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: How to add filter rule [a]
« Reply #5 on: January 26, 2019, 08:27:59 AM »
The same character escaping is needed do to the ( & ).

Code: [Select]
rule                 Name contains \(ES\)

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: How to add filter rule [a]
« Reply #6 on: January 26, 2019, 09:06:22 AM »
Ok , final question, can I make a filter like 'rompath contains...'?
Thanks.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: How to add filter rule [a]
« Reply #7 on: January 26, 2019, 12:43:45 PM »
Not directly as far as I know. There isn't any filtering file used that contains the rompath information. You can still accomplish this but it will take some creativity and a little more work. If you explained your use of this I might be able to provide a solution. A few possibilities might be...

- populate and use the "Extra" field of the romlist (this could be done manually, with a script or with a spreadsheet app)

- use separate "Emulator" names for each path needed and then use the builtin feature to combine the two romlists into one (now you can directly filter on the "Emulator" field since each will have a unique name for the rompath needed)

- create and use tagging for the roms using the specific path and then create your filter based on the tags

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: How to add filter rule [a]
« Reply #8 on: February 02, 2019, 02:18:29 PM »
Ill keeptrying, thanks for the suggestions.

Tried this , but failed.

Code: [Select]
filter               NEC
rule                 Name contains NEC
rule                 Name not_equals "NEC PC Engine-CD (Redump)"

Trying to exclude this emulator fom NEC filter.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: How to add filter rule [a]
« Reply #9 on: February 02, 2019, 02:26:12 PM »
Name = Name of the game. I think you want "Emulator". So something like this...
Code: [Select]
filter               NEC
rule                 Emulator contains NEC
rule                 Emulator not_equals "NEC PC Engine-CD \(Redump\)"