CSHARP-6216ClosedFixed
Wrong regex produced for String.IndexOfAny with an empty or null char array
When a char[] passed to *String.IndexOfAny* in a LINQ Where filter is empty or null, *StringExpressionToRegexFilterTranslator* emits a malformed character class. *anyOf.Length == 0* skips the single-character branch and falls into the else at StringExpressionToRegexFilterTranslator.cs:607, which emits [\\{escapedSet}] with an empty set. A null array throws from the foreach in EscapeCharacterSet. *x.Str.IndexOfAny(Array.Empty<char>()) == 0* rendered as *^[]* and causes server error: "Regular e