Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Locale; public class Main { /** * VERY UGLY. THIS NEEDS A REGEXP * * @param text1 The container text * @param text2 The text we are looking for * @return true if {@param text1} contains {@param text2} */ public static boolean containsIgnoreCase(final String text1, final String text2) { return text1.toLowerCase(Locale.US).contains(text2.toLowerCase(Locale.US)); } }