Which one of these would be the best way to do this when you have very long IfElse? 

```
        if (text.contains("text"))
        {
            // do the thing
        }
        else if (text.contains("foo"))
        {
            // do the thing
        }
        else if (text.contains("bar"))
        {
            // do the thing
        }else ...

```

Or

```
        if (text.contains("text") || text.contains("foo") || ...)
        {
            // do the thing
        }

```

Or maybe

```
        Pattern pattern = Pattern.compile("(text)|(foo)|(bar)|...");
        Matcher matcher = pattern.matcher(text);
        if(matcher.find())
        {
            // do the thing
        }

```

And I mean ONLY when you have to check a lot of these. Thanks!