public static boolean matches(final String data, final Pattern pattern) {
        // matcher is faster than String.contains() and more flexible - it takes patterns instead of fixed texts
        return data != null && pattern.matcher(data).find();
    }
Searches for the pattern pattern in the data.

@return true if data contains the pattern pattern
main/src/main/java/cgeo/geocaching/utils/TextUtils.java