Without using Regex, you could probably do something in lines
List<string> stromgs = new List<string>(); foreach (var s in stromgs) { var sa = s.Select(c => c.ToString(CultureInfo.InvariantCulture)).ToArray(); if (sa.Contains("a") && sa.Contains("b") && sa.Contains("c") && sa.Contains("d")) yield return s; }
To get the results you need. I havenβt profiled this code, so it can be much slower than using regular expressions for everything I know, but it should give you a way to avoid regular expressions (which I usually do).
source share