<%
Dim StringToSearch
StringToSearch = "http://www.foo.com"
Set RegularExpressionObject = New RegExp
With RegularExpressionObject
.Pattern = ".com"
.IgnoreCase = True
.Global = True
End With
expressionmatch = RegularExpressionObject.Test(StringToSearch)
If expressionmatch Then
Response.Write RegularExpressionObject.Pattern & " was found in " & StringToSearch
Else
Response.Write RegularExpressionObject.Pattern & " was not found in " & StringToSearch
End If
%>
RegExp 개체에는 Test 함수를 제외한Execute와 Replace 함수도 포함하고 있다.