You are here: Re: preg_match() regex to validate URL « PHP Programming Language « IT news, forums, messages
Re: preg_match() regex to validate URL

Posted by deko on 02/13/07 03:00

>>'/^https?:\/\/[a-z0-9-]+(\.[a-z0-9-]+)+/i'
>
> With another delimiter you could avoid the escaping of slashes and make
> the regexp a bit more readable (IMHO):
>
> '#^https?://[a-z0-9-]+(\.[a-z0-9-]+)+#i'

Thanks for the tip.

I recently found this: http://baseclass.modulweb.dk/urlvalidator/viewsource.php

which looks interesting, if not overkill.

 

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

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