정규 표현식이 대/소문자를 구분하지 않는지 여부를 지정하는 부울 값(True 또는 False)입니다.
Note:
기본값은 False입니다.
등록정보 사용 설정:
구문: Object.IgnoreCase= "<True/False>"
Dim regex, inputText
' Create a new RegExp object
Set regex = CreateObject("VBScript.RegExp")
' Set the pattern and ignore case
regex.Pattern = "apple" ' Pattern to match the word 'apple'
regex.IgnoreCase = True ' Ignore case when matching
' Input text
inputText = "I ate an AppLe today."
' Test if the pattern matches the input text
If regex.Test(inputText) Then
'Match found Logic
Else
'No match found Logic
End If
Test 메소드는 패턴이 문자열과 일치하는지 확인하고, 대소문자가 다르지만 텍스트에서 AppLe를 찾았으므로 True를 반환합니다. IgnoreCase = True 설정은 문자열 대소문자를 구별하지 않고 검색하는 데 도움이 됩니다. IgnoreCase = False인 경우 Test 메소드는 apple 문자열을 엄격하게 검색하고 apple이 inputString에 없으므로 False를 반환합니다.