Hello there people of the forum!
I have finally got around to doing regex patterns on my todo list!
I'll admit to having no idea about this as I have not previously needed to use it, other than "out of the box" is the way I usually go for preg_match()
This:-
$inputData = "matthew1980";
if(preg_match("/^([a-z]|[0-9])$/i", $inputData)){
echo "Allowed";
}else{
echo "Not allowed";
}
Doesn't do what I expect it to, all I am trying to achieve is making sure that there are only numerical & alphanumerical chars in the given string - anything else throws the exception.
Thanks in advance,
Cheers,
MRb