I was looking at some wildcard stuff for LINQ - but not having much luck
Essentially there is a for loop in which these variables will change
varFirst = "ABC"
varSecond = "DEF"
varThird = "GHI"
So for my wildcard search , I want to be sure varFirst and varThird match , but varSecond is the wildcard and can be anything.
I was looking at regex, but I'm having trouble trying to understand how to do this.
var x = vidaBiliy.SponsorPackage.Where(s => s.Policy == varFirst + varSecond + varThird ).FirstOrDefault()
So in looping over the data I have a query above that is concatenating those 3 variables (they are changing prior to this based on values from a loop . So in this case - I only want varFirst and varThird to be exact match ... but varSecond can be anything. I suppose the specs use *** , but that just means anything is allowed
I was looking at regEx.IsMatch(item) , but then I'm wondering how to achieve this.
Then I need another check for " do search for the NOT condition"
Am I overthinking it or don't have enough information?