Code: Select all
$string_exp = "/^[- ,.A-Za-zА-Яа-я0-9]+$/";
if(!preg_match($string_exp,$tour_title)) {
$error_message .= '<li>Bad data in one the "tour_desc" field.</li>';
} I suppose that is the string contains only latin symbols, cyrillic symbols, numbers, comma, dot, space or "-", the check should be OK and the email should be sent. But in reality it seems so that the test gives an error depending on what cyrillic symbols are there in the string.
I tried some examples:
[text]abvgd
абвгд
Абвгда
АбрикосыАпельсины
Абрикосы
Абр[/text]
and some of them work and some don't.
Could anybody point me at the problem please?