I am making a regular expression that validates the Venezuelan identity card and I succeed
if(preg_match_all("/(\d*[0-9]{2})/", $cedula, $resultado)){
print_r($resultado);
} else {
echo "No hubo resultado";
}
the problem is that I want the user to enter the values like this:
$cedula = 18.842.389;
that is, I want my regular expression to take into account the . let the user enter
Your regular expression should look like this
But I need them to be with any special character
So instead of the dot symbol you put \W but in capital letters and with that it validates that you put special characters between the numbers look
I leave you a list for special characters: