You are here: Re: URL character check « PHP Programming Language « IT news, forums, messages
Re: URL character check

Posted by Alvaro G. Vicario on 12/08/05 15:40

*** hendry escribió/wrote (7 Dec 2005 17:46:44 -0800):
> if (preg_match("/[^a-zA-Z0-9$-_.+!*'(),]/", $uri))
>
> doesn't work and no end of escaping seems to work.

This means: given a list of all possible characters, return TRUE if $uri
contains a character not included in the list.

You must be aware that certain characters have a special meaning in regular
expressions, just like '*' has a special meaning in a Windows or Linux
directory listing. You need to escape them when they aren't special
characters.

http://www.php.net/manual/en/ref.pcre.php
http://www.php.net/manual/en/reference.pcre.pattern.syntax.php
http://www.php.net/manual/en/reference.pcre.pattern.modifiers.php


--
-+ Álvaro G. Vicario - Burgos, Spain
++ http://bits.demogracia.com es mi sitio para programadores web
+- http://www.demogracia.com es mi web de humor libre de cloro
--

 

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

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