Regex to catch url in a string [duplicate]
Possible Duplicates:
Regex to match URL What is the best regular expression to check if开发者_Go百科 a string is a valid URL
I want to catch urls in strings if any. What is the best regex for this? Urls may or not be abolute.
http://www.blabla.com
http://blabla.com
www.blabla.com
all should match.
Thank you.
\b(https?)://[-A-Z0-9+&@#/%?=~|!:,.;]*[-A-Z0-9+&@#/%=~|]. this regex is enough to some degree but no match for www.blabla.com , so how can i edit to catch the latter either?
精彩评论