ereg() Regex Problem...
Posted: Sat Jul 27, 2002 2:04 am
I could have sworn this worked before, but now this code is giving me a problem.
The error it produces is:
I'm assuming that it means there's a problem with the '{1,20}', but isn't that valid? There's no spaces in there at all, just one character after another.
Any ideas?
Currently running PHP v.4.0.3 [trust me, it's not my choice, my ISP pretty much decides this stuff for me =[.
Any help would be appreciated. Thanks in advance.
[Edit: corrected the error line number, since it didn't match the c'n'p code above.]
Code: Select all
$temp_name = 'john';
if(!ereg('^їA-Za-zÀ-ÖØ-öø-ÿї:digit:]_]{1,20}', $temp_name)) {
echo 'regex does not match.';
} else {
echo 'regex does match.';
}Code: Select all
Warning: Invalid range end in test.php on line 2
regex does not match.Any ideas?
Currently running PHP v.4.0.3 [trust me, it's not my choice, my ISP pretty much decides this stuff for me =[.
Any help would be appreciated. Thanks in advance.
[Edit: corrected the error line number, since it didn't match the c'n'p code above.]