VBS tutorial: VBScript attribute – ignorecase attribute


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


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"))

Recommended Today

Hive Foundation

1、 Hive basic concepts Hive is a data warehouse tool based on Hadoop. It can map structured data files into a table and provide SQL like query functions. The essence is:Convert HQL into MapReduce program flow chart Architecture Principle Architecture diagram User interface (client):cli (hive shell), jdbc/odbc (Java access hive), webui (browser access hive) Metadata: […]