JavaScript RegExp ignoreCase property

definition and usage

ignoreCase the property specifies whether the "i" modifier is set.

if set "i" modifier, then this property returns true, otherwise return false.

description

RegExp object's ignoreCase the property is a read-only Boolean value.

it specifies whether the regular expression performs case-sensitive matching, such as whether the flag i was used when it was created.

example

let pattern = /W3S/i;
let result = pattern.ignoreCase;

try it yourself

syntax

regexp.ignoreCase

return value

type description
Boolean value if set 'i' modifier, return true, otherwise return false.

browser support

ignoreCase wannan ne ECMAScript1 (ES1) duwanci.

所有浏览器都完全支持 ES1 (JavaScript 1997):

Chrome IE Edge Firefox Safari Opera
支持 支持 支持 支持 支持 支持