My code is as followed:
public function validateTIME($param)
{
$item = $param->Item;
$value = $item->configValue->TextBox->Text;
if(preg_match('^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$', "$value"))
{
echo 'nice';
}
else{ echo "$value";
echo 'wrong';
}
}
My question is why it does only go into the else part and not in the if one. The regex pattern is HH:MM (Hour=H Minute=M) and the pattern is ok.