Need regex to match links like www.example.com in an html/text-string but:
- not match
"www. some text after" - not match
"www" only such as "some text before www some text after" - not match link with
http - must start with white space (
\s) or not character before such as:" www.example.com"or"www.example.com"
I tried with:
'/(^|\s)(www[^\s].[^<> \n\r \s]+)/iex'
but also match "www. some text after"