VBScript CreateObject Function

The CreateObject function creates an object of a specified type."

Example

Example

Creating a regular expression object:

<%

txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))

%>

The output of the code above will be:

Th##s is a beautiful day

❮ Complete VBScript Reference