diff --git a/Sieve/Models/SieveModel.cs b/Sieve/Models/SieveModel.cs index 8eaacbf..29ead9c 100644 --- a/Sieve/Models/SieveModel.cs +++ b/Sieve/Models/SieveModel.cs @@ -27,7 +27,19 @@ public List FiltersParsed var value = new List(); foreach (var filter in Filters.Split(',')) { - value.Add(new FilterTerm(filter)); + if (filter.StartsWith("(")) + { + var filterOpAndVal = filter.Substring(filter.LastIndexOf(")") + 1); + filter = filter.Replace(subfilterOpAndVal, "").Replace("(", "").Replace(")",""); + foreach (var subfilter in filter.Split("|")) + { + value.Add(new FilterTerm(subfilter + filterOpAndVal)) + } + } + else + { + value.Add(new FilterTerm(filter)); + } } return value; }