I have a String that contains new line characters say...

`str = "Hello\n"+"Batman,\n" + "Joker\n" + "here\n"`

I would want to know how to find the existance of a particular word say .. `Joker` in the string `str` using `java.lang.String.matches()`

I find that `str.matches(".*Joker.*")` returns `false` and returns `true` if i remove the new line characters. So what would be the regex expression to be used as an argument to `str.matches()`?

One way is... `str.replaceAll("\\n","").matches(.*Joker.*);`