FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Create automatic links with www. only
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Create automatic links with www. only [message #15086 is a reply to message #15076] Mon, 01 December 2003 22:32 Go to previous messageGo to previous message
melvyn is currently offline  melvyn   Netherlands
Messages: 7
Registered: December 2003
Location: Hilversum, The Netherland...
Karma:
Junior Member
_ aren't allowed in domains (long discussion about '_' being used in RR records) but '-' are

[^\s] = \S

[A-Za-z] with /i is redundant

www.country.domain.tld isn't recognized

tld needs a minimum of 2 and I think a max of 6 (.museum) which can be used as an anchor point.



resulting in:




$str = preg_replace('!(^|\s)(www\.[A-Za-z0-9.-]+\.[A-Za-z]{2,6})!','\1http://\2', $str);





Melvyn

[Updated on: Mon, 01 December 2003 22:33]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Private message commands at top of page
Next Topic: Cmd line installer.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 09:28:47 GMT 2024

Total time taken to generate the page: 0.03931 seconds