Bash: Data Input Verification Help!

Hey guys i am trying to right script with this:

Input
Valid user input can be in the following formats:
Distance: in miles or kilometers, e.g. 100mi or 100km
Speed: miles per hour or kilometers per hour, e.g. 100m/h or 100km/h
Time: in hours and minutes, e.g. 1hr.20min, 1:20, or any integer which defaults to that number of hours, as in 3 (is 3 hours).
Any combination of the above formats can be entered on the command line and in any order.
Distance and speed can be entered as any decimal number, e.g. 50.8793mi, 78.405km/h

Problem:
I have no problem with working with speed and distance, the only problem now i am having is with time entered in this format
1hr.20min, i wanna be able to extract the numeric characters, I am guess i have to cut the variable into 2 pieces somehow, the length of the string can vary as it can be entered as 12hr.35min, so i am not sure how to do this. I wanna be able to be able to transform hour into minutesm thus if 1hr.20min is entered, i wanna use this data to get 60+20=80mins.

Is there any way i can do it using sed or awk, i am not too familiar with it so any help would be appreciated.

Thanks.

Try:-

mins=$(echo $time|sed -n 's/.*[^0-9]\([0-9][0-9]*\).*/\1/p')

hrs=$(echo $time|sed -n 's/\([0-9][0-9]*\)[^0-9]*.*/\1/p')

I think that should give you the hours and minutes whatever format the time is entered in.

Cheers