Property: IgnoreCase for RegExp
- Updated2024-09-12
- 1 minute(s) read
Properties > Property: IgnoreCase for RegExp
Property: IgnoreCase for RegExp
Specifies whether the search for the text pattern is case sensitive or not. If you assign the value FALSE to the IgnoreCase variable, the search is case sensitive.
Object.IgnoreCase
| Object | RegExp Object with this property |
| Object.IgnoreCase | Boolean with read and write access |
The following example replaces the text pattern bc in the entire character string and is case insensitive here:
Dim RegExpression, sText Set RegExpression = CreateObject("VBScript.RegExp") RegExpression.Pattern = "bc" RegExpression.Global = TRUE RegExpression.IgnoreCase = TRUE sText = RegExpression.Replace("abcABC","bcdef") Call MsgBox(sText) ' Returns abcdefAbcdef