<%
dim Content
Content="銀川志達四方電子科技有限公司<IMG height=267 src='http://www.morgu3.com/image/logo.jpg' width=400 border=0>是寧夏銀川地區一家網絡公司。"
Str = Content
Set regEx = New RegExp '建立正則表達式。
regEx.Pattern = "(<img)(.[^<>]*)(src=)('|"&CHR(34)&"| )?(.[^'|\s|"&CHR(34)&"]*)(\.)(jpg|gif|png|bmp|jpeg)('|"&CHR(34)&"|\s|>)(.[^>]*)(>)" '設置模式。
regEx.IgnoreCase = True '設置是否區分字符大小寫。
regEx.Global = True '設置全局可用性。
Set Matches = regEx.Execute(Str) '執行搜索。
For Each Match in Matches '遍歷匹配集合。
'輸入圖片地址
Response.Write "<img src='"&Match.SubMatches(4)&"."&Match.SubMatches(6)&"'>" '顯示圖片
Response.Write Match.SubMatches(4)&"."&Match.SubMatches(6)&"<br>" '圖片地址
Next
%>