You are here: Re: Extract any URL from any string? « PHP Programming Language « IT news, forums, messages
Re: Extract any URL from any string?

Posted by deko on 02/14/07 19:04

>> Any suggestions on how to construct that $invalid pattern? I'm not sure
>> what syntakx to use or what characters need to be escaped.
>
> Again, I would implement it all in one regex, using the /x modifier to
> maintain readability. You could use that list of invalid chars in a
> negative lookahead - but there are plenty of ways you can do this.
> Just not sure how worth it it would be to go all out.

This seems to be working:

preg_match('/[^0-9a-z-]/i', $urlHost_a[$d])

http://www.liarsscourge.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация