我有这样一串字符串:从字符串获取URL文本
Some text, bla-bla http://www.easypolls.net/poll.html?p=51e5a300e4b084575d8568bb#.UeWjBcCzaaA.twitter
,我需要这个字符串解析二:
Some text, bla-bla
http://www.easypolls.net/poll.html?p=51e5a300e4b084575d8568bb#.UeWjBcCzaaA.twitter
我需要把它们分开,但是,中当然,仅解析URL就足够了。
你能帮助我,我怎么能从这样的字符串解析网址。
分割? –
在问这里之前,你有没有做过自己的研究?我刚刚搜索“从字符串中提取URL”,并且有很多帖子可能对您有帮助! :) – eldris
您可能正在寻找[URL正则表达式](http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is- a-valid-url).. – bbill