Friends, I'm rushing towards deadline and I think that makes me do childish mistakes. Here I have validation that requires regex and each time I input valid expression preg_match returns false. It is long now I'm trying to spot error but I cannot! I have googled and AFAICS, things seems alright please help me spot the error. Thanks, Stefano
<?php
$string = "37961/T.08";//valid ID, it is supposed to match
$regex = '/^[0-9]{5,}/[a-zA-Z]\.[0-9]{2,}/';
if (preg_match($regex, $string)) {
echo matched expression!';
} else {
echo 'unmatched expression pattern';//comes here instead of valid regex!
}
?>