What does / i mean at the end of a regular expression?

What is the meaning of /ithe tail of this regular expression?

var time = /^([1-9]|1[0-9]):([0-5][0-9])(\s[a|p]m)$/i;
+5
source share
2 answers

/iindicates the case of ignoring on this line. Commonly referred to as case insensitive, as noted in the comment.

+21
source

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.

+1
source

All Articles