blackcore

本质的东西,深植于骨骼,扎根于灵魂! 淘实惠,各类电子版书籍

导航

2011年11月1日 #

Excel Vba 正则URL协议、域名、端口号、页面路径

摘要: 打开Excel,Shift + F11 打开VBA编辑器,注意高度时必须先保存,否则会提示无法高度外部程序。Sub RegexURL()Dim url As StringDim regex As Objecturl = "http://www.baidu.com/a/b/index.html"Set regex = CreateObject("vbscript.regexp")regex.Global = Trueregex.Pattern = "(\w+)://([^/:]+)(:\d*)?([^# ]*)"MsgBox regex 阅读全文

posted @ 2011-11-01 18:45 blackcore 阅读(1211) 评论(0) 推荐(0) 编辑