public List<String> getTablesByPattern(String tablePattern) throws HiveException {
    return getTablesByType(SessionState.get().getCurrentDatabase(),
        tablePattern, null);
  }
Returns all existing tables from default database which match the given
pattern. The matching occurs as per Java regular expressions

@param tablePattern
         java re pattern
@return list of table names
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java