Q:

What's the best way to parse this kind of input?

I need to evaluate some strings (items titles) in order to decide if the item matches or not with some rules.
Regarding the rules, think about something like this.
((ball | balls) & messi) -ronaldo

The meaning is, if the title contains either ball or balls and messi (but not ronaldo) means that match.
What do you think is the best way to achieve this? (the rule must be written by end users and with a clear syntax, no regex)
Thanks!

A:

I found this library Boolean Expressions and just built a wrapper to parse the keywords and works like a charm !!

