What does /i at the end of a regex mean?

前端 未结 2 534
春和景丽
春和景丽 2020-12-17 09:15

What is the meaning of /i at the tail of this regex?

var time = /^([1-9]|1[0-9]):([0-5][0-9])(\\s[a|p]m)$/i;
2条回答
  •  时光取名叫无心
    2020-12-17 10:10

    /i stands for ignore case in the given string. Usually referred to as case-insensitive as pointed out in the comment.

提交回复
热议问题