Matching loosely formed urls using regex and php?

tedjungle

New Member
I'm trying to identify urls in a set of text. However I would like to be able to identify loosly formed urls such as :example.com
www.example.comI'm not very good at regex :( I found patter below but unfortunately it requires the scheme.\[code\]/(([[:alnum:]]+:\/\/)|www\.)([^[:space:]]*)([[:alnum:]#?\/&=])/i\[/code\]Would it be possible to match a whole string (no spaces) which includes .com or .net or .org etc ?Thanks
 
Back
Top