I have a variable like this
var time = "12h 55m";
I am only allowed to use H,h,M,m characters in the string. If i have something like this
var time = "12hk 55m";
then it should produce an error. how can I validate this using regex expression.'
looking for something like this
if (stringToTest.match(/^[a-zA-Z0-9]*$/))
12m 55his also valid?65h 097h?"12h 55m".match(/^\d{1,2}[hm]\s+\d{1,2}[hm]$/g)hormallowed