contains doesn't use regex. You may want to create Pattern and then for each of your string separate Matcher and check if it can find regex you described. So your code can look like
private static final Pattern p = Pattern.compile("^\\d\\d\\s?[a-Z]?");
public static boolean test(String str){
return p.matcher(str).find();
}
(you can rename this method into something more descriptive)
You could try with yourString.matches(regex) but this method checks if regex matches entire string, not just part of it, which means that it can be inefficient if your string is long, and you want to check only first few characters.
containsdoesn't use regex.