正規表示式是一連串構成樣式的字元,主要用於搜尋和取代。建立樣式的目的是配對特定字串,因此可以根據條件擷取字元並取代特定字元。
下列程式碼說明如何建立 RegExp 物件:
RegExp
物件名稱:VBScript.RegExp
VBScript.RegExp
Dim regExpObj ' Create a variable. Set regExpObj = CreateObject("VBScript.RegExp")
Scripting on this page enhances content navigation, but does not change the content in any way.