我的正则表达式很差,让我失望,所以在这里有一些帮助。正则表达式 - 查找推文中的所有链接
所有我想要做的是返回所有出现在推特(只是一个字符串)的链接 - 一些例子是:
"Great summary http://mytest.com/blog/post.html (#test)
"http://mytest.com/blog/post.html (#test)
"post: http://mytest.com/blog/post.html"
它应该还支持多个链接,如: "read http://mytest.com/blog/post.html and http://mytest.com/blog/post_two.html"
任何帮助都会很棒!
感谢
本
这取决于你想得到多么具体。也许发布你使用的正则表达式,以及你没有捕捉到的情况可能是有用的。 – 2009-09-13 00:55:27