IsLike Function:

The IsLike function compares a string using a regular expression and returns True if the regular expression matches the input string or False if the pattern doesn't match. There are two required arguments, string and pattern. String is the string to compare. Pattern is the regular expression to apply to the string. Returns Null if error handling is enabled and a problem is enountered during comparison.

Syntax:
boolean = IsLike(string, pattern)
Example Usage:
<%
 ' IsLike returns True to indicate a pattern match.
response.write IsLike "Bill Gearhart", "[A-Z]\D\D\D\s[A-Z]\D\D\D\D\D\D\D"

 ' IsLike returns False to indicate no pattern match.
response.write IsLike "Bill Gearhart", "B[^i]"
>%
ASP Source Code:
<%
Private Function IsLike(byVal String, byVal Pattern)
	Dim a, b, boolErr
	On Error Resume Next
	Set a = New RegExp
	If Err Then
		boolErr = True
	End If
	On Error GoTo 0
	If boolErr then 
		Err.Raise 5108, "IsLike Function", "This function uses " & _
			"the RegExp object and requires the VBScript " & _
			"Scripting Engine Version 5.1 or higher."
		IsLike = Null
		Exit Function
	End If
	a.Pattern = pattern
	a.IgnoreCase = false
	a.Global = true
	Set b = a.Execute(String)
	if b.Count > 0 then 
		IsLike = True 
	else 
		IsLike = False
	end if
	Set b = nothing
	Set a = Nothing
End Function
%>