Funzione Crea oggetto VBScript
❮ Riferimento completo di VBScriptLa funzione CreateObject crea un oggetto di un tipo specificato.
Sintassi
CreateObject(servername.typename[,location])
Parameter | Description |
---|---|
servername | Required. The name of the application that provides the object |
typename | Required. The type/class of the object |
location | Optional. Where to create the object |
Esempio
Esempio
Creazione di un oggetto espressione regolare:
<%
txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))
%>
L'output del codice sopra sarà:
Th##s is a beautiful day
❮ Riferimento completo di VBScript