|
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]
|