Javascript Regex ignoreCase Properties

JavaScript ignoreCase property helps to return the Boolean value to see the availability of the "i" modifier. If the "i" modifier sets, the output shows a true value; otherwise, it shows false. The ignore-case property offers the operations of the data without a case-sensitive format.

Syntax

The following syntax is used to get the last index before starting the next value.

Supported Browsers

The following browsers work for RegExp ignoreCase properties:

  • Google Chrome
  • Edge
  • Firefox
  • Internet Explorer
  • Opera
  • Safari

Examples

The following examples show the availability of the "i" modifier.

Example 1:

The example shows the case-insensitive modifier available using the ignoreCase property. Here, we use regex directly with the ignoreCase keyword.

Output

The output shows the availability of the case-insensitive modifier.

Javascript Regex ignoreCase Properties

Example 2:

The example shows the array function's last position of the matching character for the ignoreCase property.

Output

The output shows the availability of the case-insensitive modifier.

Javascript Regex ignoreCase Properties

Example 3:

The example shows the string's last position of the matching character for the ignoreCase property. Here, we use the new Regexp() method with the regex format.

Output

The output shows the availability of the case-insensitive modifier.

Javascript Regex ignoreCase Properties

Conclusion

The regex ignore case property works for all types of cases, and it is uppercase and lowercase. It is easy to operate an extensive size database for developers and filter the value for the users.






Latest Courses