Author Topic: advanced filters  (Read 2825 times)

Vald

  • Newbie
  • *
  • Posts: 2
    • View Profile
advanced filters
« on: October 08, 2018, 05:35:19 PM »
Good evening,

I've been testing and searching for answers but cannot find any.  What do the brackets and slashes do in filters?

What I'm trying to do is filter out, say, anything that has "Euro" in the title, but only within brackets.  So, for example, it should filter out (Euro, Kor) or (Jap, Euro, Kor) but not "European Games"

Those are just made-up examples, of course.

I can't find any information on filters except some samples, but they don't explain how they work.

Is there a more in-depth guide somewhere?

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: advanced filters
« Reply #1 on: October 08, 2018, 05:43:44 PM »
https://github.com/mickelson/attract/wiki/Example-filters

Shows example similar to your situation. You can escape a parentheses with a backslash. I don’t think regex is supported. If this is the case, I see two options. Don’t include a parenthesis. Or explicitly come up with every language combo you see.

Vald

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: advanced filters
« Reply #2 on: October 08, 2018, 06:38:04 PM »
Thanks for the reply. I've used those filters but there's no explanation to them.  So will parentheses be ignored in filters without the backslash?  There's no pattern matching at all?

I'd suspected this but it's time-consuming to test and I can only get a few minutes here and there to work on this.

Thanks again

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: advanced filters
« Reply #3 on: October 08, 2018, 06:47:34 PM »
This should work.

Code: [Select]
filter               Euro
rule                 Name contains \(*Euro*\)

If you look at the "No Clones" rule in the wiki link mentioned above you can see that the "*" is used. I did minimal testing and it seems to work. This should eliminate the need to remove "(" and ")" and also needing to specify all the various possible combinations in of (Euro) in your rule(s). Cleaner is better.
« Last Edit: October 09, 2018, 01:20:53 AM by progets »