public static boolean stringContainsVersionHardcode(String string, Pattern searchPattern) {
    Matcher matcher = searchPattern.matcher(string);
    return matcher.find();
  }
Looks for search pattern in string
@param string string to look into
@param searchPattern compiled regex
@return true if string contains pattern
ambari-server/src/main/java/org/apache/ambari/server/checks/HardcodedStackVersionPropertiesCheck.java