blackcore

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

导航

11 2011 档案

如何只保留一个应用程序实例
摘要:直接贴代码,简单不用说明: static class Program { ///<summary> /// The main entry point for the application. ///</summary> [STAThread] static void Main() { try { Application.SetUnhandledExceptionMode(UnhandledExceptionMode.Catch... 阅读全文

posted @ 2011-11-24 00:36 blackcore 阅读(266) 评论(0) 推荐(0)

Excel Vba 过滤主域名
摘要:Sub FilterSiteDomain() Dim siteUrl As String Dim siteDomain As String Dim siteMainDomain As String siteUrl = "http://www.baidu.com/a/b/index.html" '获取URL域名 siteDomain = GetSiteByUrl(siteUrl) MsgBox siteDomain '获取URL主域名 siteMainDomain = GetSiteDomain(siteDomain) MsgBox s... 阅读全文

posted @ 2011-11-02 12:18 blackcore 阅读(742) 评论(1) 推荐(0)

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 阅读(1247) 评论(0) 推荐(0)