Hi,
I want check birthdayinput. It just should be given in like this: '06.06.1970'.
I wrote a function:
function bad_birthday ($birthday){
//if(!eregi("([0-9]{1,2}).([0-9]{1,2}).([0-9]{4})",$birthday)){
//if(!eregi("([0-9]{1,2})..",$birthday)){
if(!eregi("[0-9]+.[0-9]+.[0-9]",$birthday)){
return 1;
}else{
return 0;
}
}
Calling:
if( ! ereg( "[:blank:]*$", $shedateofbirth) ){
if(bad_email($shedateofbirth)){
mReturn(-1);
exit();
}
}
I worte other checks like this and it works.
I need help in rewording the regexpression..
- How can I specify uppercase?
This 'eregi("[A-Z]+$",$location)' allowes lower case..
Thanks,
Tanja