Soldato
- Joined
- 18 Apr 2004
- Posts
- 2,613
- Location
- London
I am doing some basic form validation and I want to see if some thing contains characters other than letters, however the \P{l} element returns this error...
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: unknown property name after \P or \p at offset 3 in register_action.php on line 1.
Heres the code...
I thought it might be that you have to be in UTF8 mode but how?
Thanks!
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: unknown property name after \P or \p at offset 3 in register_action.php on line 1.
Heres the code...
PHP:
1 preg_match_all("^[\P{l}]^", $_POST['firstname'], $output);
2 if (count($output) > 0) echo "bad times";
I thought it might be that you have to be in UTF8 mode but how?
Thanks!