我的正則表達式很差,讓我失望,所以在這裏有一些幫助。正則表達式 - 查找推文中的所有鏈接
所有我想要做的是返回所有出現在推特(只是一個字符串)的鏈接 - 一些例子是:
"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