Subscribe
- Subscribe by RSS Feed
- Subscribe by E-mail via FeedBurner
- Subscribe by E-mail via QQ List
-
Recent Posts
Recent Comments
- 提取 URL 的正则表达式 8
orzFly, Andre, guaishou, guaishou, orzFly, hapi, orzFly, xiao3 - Teleportower – 平行之塔 5
TFY, 北落师门, 飞猪, orzFly, Epile - 秋收的倒计时 - 序言 1
phy - 永远的高一 13 班 1
小郁君 - 随笔 - 20110823 2
orzFly, phy - 随笔 - 20110803 2
怪獸君, Epile - 珍讲镇江 - 0:序 4
Epile, phy, orzFly, phy - 随笔 - 20110719 3
phy, orzFly, Epile - 2011 高考安徽卷作文练笔《时间在流逝》 5
Rocky, phy, 默默, orzFly, cosbeta - 木中高一 13 班打铃器 1.0.0.0 1
orzFly
- 提取 URL 的正则表达式 8
Sponsored Links
Category Archives: E = Effective Computers
Bookmarklet:割绳子 PC 版 Internet Explorer 隐藏关开启
Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites. Then click it when you are at the game page. Have fun. 拖动下面的链接到您的书签栏或右键它然后添加到收藏夹。在游戏界面点击!祝您愉快。 CutTheRope Hidden Levels!
Posted in E = Effective Computers, I = Interesting Games
Tagged Bookmarklets, Cut the Rope
Leave a comment
Bookmarklet:快速复制网页标题及地址(引用)
又翻到 phy 同学那可爱的快速复制网页地址等 HTML 代码书签,觉得那功能也太差了点,于是做了一个升级版的。嗯,就是你下面看到的这个。 Refer to this page 拖动这个按钮去你的书签栏吧,目前支持复制成文字、HTML、UBB 代码和仅复制标题四种模式。比如在本页面使用,会生成如下东东: HTML:<a href="http://orzfly.com/weblog/bookmarklet-refer-to-this-page/" target="_blank">Bookmarklet:快速拷贝网页标题及地址(引用) | 陆一尘的博客 | orzFly’s Blog</a> UBB:[url=http://orzfly.com/weblog/bookmarklet-refer-to-this-page/]Bookmarklet:快速拷贝网页标题及地址(引用) | 陆一尘的博客 | orzFly’s Blog[/url] Text:Bookmarklet:快速拷贝网页标题及地址(引用) | 陆一尘的博客 | orzFly’s Blog http://orzfly.com/weblog/bookmarklet-refer-to-this-page/ Title:Bookmarklet:快速拷贝网页标题及地址(引用) | 陆一尘的博客 | orzFly’s Blog Internet Explorer … Continue reading
在路上——我和互联网的那些事儿
9 点 26 分,我在 EmEditor 编辑器中写完 HostsX 新版的最后一段代码。 10 点 20 分,我在 Gmail 邮箱中阅读着之前用户发来的反馈报告。 11 点 3 分,我在 Chrome 浏览器中在我基于 WordPress 的网站上发布了 HostsX 软件的新版本 0.2.0.520。 一切看上去都像是一个开发者——我——的生活。嗯,勉强算是吧,不过眼前最让我牵挂的似乎还是 4 个月后那场可恶的中考。我讨厌考试,这种压力很不好。
Posted in A = Amazing Life, D = Decent Study, E = Effective Computers, M = Mobile Phones
Tagged 66RPG, Visual Basic, 互联网, 幻想, 童年, 网络, 自己, 苏州, 谷歌, 赢政, 镇江
15 Comments
谷歌拼音扩展 LUA 中的 orderedPairs
今天在写谷歌拼音扩展,希望给出的候选词能按照数字顺序排列,而我在源文件中 table 中 key 已经按顺序写了,可输出仍然是乱序。于是去官网查了点资料,发现一段代码: –[[ Ordered table iterator, allow to iterate on the natural order of the keys of a table. Example: ]] function __genOrderedIndex( t ) local orderedIndex = {} for key in pairs(t) do table.insert( orderedIndex, key … Continue reading
提取 URL 的正则表达式
有个朋友问我一个在复杂文本中提取 URL 的正则表达式,在网上搜索了一下,鼓捣了好久,综合了多方资源,写出这么一个正则表达式: (?<![a-zA-Z0-9:\/])((http|https|ftp):\/\/)?([A-Za-z0-9-]+\.)+[A-Za-z]{2,}(:[0-9]+)?[.\/=\?%\-&_~`@[\]\’:+!]*([^\"\"])*?(?![\/=\?%\-&_~`@[\]\’:+!A-Za-z0-9.]) 加上点注释,我们来分析下: (?<![a-zA-Z0-9:\/])(?#去掉左侧无用字符) ((http|https|ftp):\/\/)?(?#协议) ([A-Za-z0-9-]+\.)+(?#域名) [A-Za-z]{2,}(?#TLD) (:[0-9]+)?(?#端口号) [.\/=\?%\-&_~`@[\]\’:+!]*(?#分隔符) ([^\"\"])*?(?#网址) (?![\/=\?%\-&_~`@[\]\’:+!A-Za-z0-9.])(?#去掉右侧无用字符) 于是能看懂了么? 测试了些正常的 URL,都很正确。 http://orzfly.com/ http://orzfly:8080/orztech.php?tel=123456 https://orzfly.com/ http://www.williamlong.info/script/common.js relatedlinks.googlelabs.com/client/client.js?url=shcom&referrer=&relatedlinks_id=10065_599317151813484&title= …… 测试了些不正确的 URL: www.1\a.exe:没有匹配,正确。 [email protected]:没有匹配,正确。 123%ww.com:没有匹配,正确。 www.煞笔.com:没有匹配,不正确。应该能匹配,但是由于支持国际域名难度较大,抛弃。 www.a/b.cc:没有匹配,正确。 g.cn/a/b.exe:没有匹配,正确。 www.g.cnmmmg.cnlllhttp:123.123.123.123:80hhhwok.cshdn.comsdfsdf:能完整匹配,但是这个肯定不正确。求高人指点。 参考资料: 正则表达式30分钟入门教程 常用正则表达式-月光博客 一些常用的正则表达式 – 纯蓝的天空 ≡══─── 超强匹配url地址的正则表达式

