Ignorecase attribute
Sets or returns aBooleanValue indicating whether the pattern search is case sensitive.
object.IgnoreCase [= True | False ]
The object parameter is always aRegExpObject. If the search is case sensitive, thenIgnoreCaseAttribute isFalse; OtherwiseTrue。 The default value isFalse。
explain
The following code illustratesIgnoreCaseAttribute usage (change)IgnoreCaseProperty to see its effect):
Function regexptest (PATRN, strng) dim regex, match, matches' create variables. Set regex = new regexp 'establish a regular expression. regEx. Pattern = pattern 'sets the pattern. regEx. Ignorecase = true 'setting is case insensitive. regEx. Global = true 'set global availability set matches = regexecute (string)' performs a search. For each match in matches' duplicate matching set retstr = retstr & "match found at position" retstr = retstr & match FirstIndex&".Match Value is '"RetStr=RetStr&Match. Value&"'."& vbCRLF NextRegExpTest=RetStrEnd FunctionMsgBox(RegExpTest("is.", "IS1 is2 IS3 is4"))