Filtering a string list with logic?

petershanghai

New Member
I have a list of strings. I need to be able to filter them in a similar way to a Google query.Ex: \[code\]NOT water OR (ice AND "fruit juice")\[/code\]Meaning return strings that do not have the word water or return strings that can have water if they have ice and "fruit juice".Is there a mechanism in .NET that can allow the user to write queries in this form (say in a textbox) and given a List or IEnumerable of string, return the ones that contain this.Can LINQ maybe do something like this?I am aware that I can do this with LINQ, I'm more concerned with parsing an arbitrary string into an executable expression.
 
Back
Top