I know this is an old question, but I am writing here so that the next person who needs help can be helped.
You can use matches.
String str = "Hello, this is a trial text";
str1 = str.toLowerCase();
if(str1.matches(".*trial.*")) //this will search for the word "trial" in str1
{
//Your Code
}