Sum the time durations Challenge

Write the shortest code that can sum all the time durations that appear in the stdin. The program must only consider the strings that match with one of the following patterns and ignore the rest.

    HH:MM:SS     (it will be interpreted as HH hours, MM minutes and SS seconds)        
    H:MM:SS      (it will be interpreted as H hours, MM minutes and SS seconds)
    MM:SS        (it will be interpreted as MM minutes, SS seconds)
    M:SS         (it will be interpreted as M minutes, SS seconds)


examples of strings that match with the enumerated patterns:  

    12:00:01  
    2:03:22  
    00:53  
    9:13


The output should be of the form      

    HHh MMm SSs      (that means HH hours, MM minutes and SS seconds with non-zero-padding)


Example

STDIN


  View the Welcome video.
    Video: 10:37 min.
  View the video introduction to the course.
    Video: 3:30 min. 
  View the video of how to use the Lesson Overview.
    Video: 9:13 min.
  View the video overview of how to use the Epsilen system to share your work.
    Video: 03:15 min.
  View the video to learn about the State of Texas Assessment of Academic Readiness (STAAR).
    Video: 1:05:26 min.   


STDOUT  


  1h 32m 1s
Javascript ES6, 138 chars

Function, 139

Takes string as an argument and writes output to console:

f=s=&gt;(r=0,s.replace(/(\d\d?):(\d\d)(:(\d\d))?/g,(m,a,b,x,c)=&gt;r+=x?+c+b*60+a*3600:+b+a*60),console.log("%dh %dm %ds",r/3600,r%3600/60,r%60))


Program, 138

prompt(r=0).replace(/(\d\d?):(\d\d)(:(\d\d))?/g,(m,a,b,x,c)=&gt;r+=x?+c+b*60+a*3600:+b+a*60),console.log("%dh %dm %ds",r/3600,r%3600/60,r%60)


Test for function

f("View the Welcome video.\n\
Video: 10:37 min.\n\
View the video introduction to the course.\n\
Video: 3:30 min. View the video of how to use the Lesson Overview.\n\
Video: 9:13 min.\n\
View the video overview of how to use the Epsilen system to share your work.\n\
Video: 03:15 min.\n\
View the video to learn about the State of Texas Assessment of Academic Readiness (STAAR).\n\
Video: 1:05:26 min.")


Output

"1h 32m 1s"