JavaScript ignoreCase Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

JavaScript ignoreCase Property

❮ JavaScript RegExp Object

Example

Check whether or not the "i" modifier is set:

var str = "Visit W3Schools!";
var patt1 = /W3S/i;
var res = patt1.ignoreCase;
Try it Yourself »

Definition and Usage

The ignoreCase property specifies whether or not the "i" modifier is set.

This property returns true if the "i" modifier is set, otherwise it returns false.


Browser Support

Property
ignoreCase Yes Yes Yes Yes Yes

Syntax

RegExpObject.ignoreCase

Return Value

Type Description
Boolean Returns true if the "i" modifier is set, false otherwise

Technical Details

JavaScript Version: ECMAScript 1

❮ JavaScript RegExp Object