VBScriptCreateObject関数_
❮完全なVBScriptリファレンスCreateObject関数は、指定されたタイプのオブジェクトを作成します。
構文
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 |
例
例
正規表現オブジェクトの作成:
<%
txt="This is a beautiful day"
Set objReg=CreateObject("vbscript.regexp")
objReg.Pattern="i"
response.write(objReg.Replace(txt,"##"))
%>
上記のコードの出力は次のようになります。
Th##s is a beautiful day
❮完全なVBScriptリファレンス