php preg_match utf-8 strange behaviour

flagggo

New Member
I search the internet but I couldn't find a proper answer so I try this way.I use this code to validate UTF-8 input. I want to allow printable chars and some specified special chars.\[code\]$pattern = '/[^\w\.\-\s\,\&\!\?\(\)\+\_\:\;]+$/u';$status = @preg_match($pattern, $value);if (($status === false) || ($status > 0)) { return false;}\[/code\]Everything works fine, EXCEPT the input string has at the end a non ascii char (eg.
 
Back
Top