library(stringr)
Times <- c("12h00","16h30","Afternoon","15h00","14h20","7h30","06h00")
str_extract(Times, '[1-9]\\d*(?=h)')