What is the meaning of /ithe tail of this regular expression?
/i
var time = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
/iindicates the case of ignoring on this line. Commonly referred to as case insensitive, as noted in the comment.
This is how Sachin Shanbhag already responded to the ignore modifier. So, /[a-z]/iequal /[a-zA-Z]/. Check out this link for other modifiers.
/[a-z]/i
/[a-zA-Z]/