我有這樣一串字符串:從字符串獲取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