Question: What is the best practice way to use two clauses in LINQ Contains method..

Title is string

**This is my If statement :** 

```
if (oWeb.ParentWeb.Title.Contains("Ricky") || oWeb.ParentWeb.Title.Contains("John"))

```

**I need solution like this :**

```
 if (oWeb.ParentWeb.Title.Contains("Ricky", "John"))

```

Answer: 
Since `Title` is `string` this actually has nothing to do with LINQ as the used `Contains` method is an instance method of `string`.

Assuming you have more strings to check, you can do something like that:

```
var strings = new[] {"Ricky", "John"};
if (strings.Any(oWeb.ParentWeb.Title.Contains))
    // do something

```

But [roryap](https://stackoverflow.com/a/38876432/5528593)'s answer using a regex seems preferable (as long as the number of strings to check is not too big).
I don't think LINQ is the best option for that. Why not use regular expressions?

```
Regex.IsMatch(oWeb.ParentWeb.Title, "ricky|john", RegexOptions.IgnoreCase);

```