Helpful, saved aswell thanks!
function validateAddress($address){
$regex = "/^[x][a-km-zA-HJ-NP-Z0-9]{26,33}$/";
if (preg_match($regex, $address)) {
// match success
return true;
} else {
// If preg_match() returns false, then the regex does not
// match the string
return false;
}
}
I Have saved this to my snippets folder, Thanks dude.
You could replace the 0-9 with 1-9 because we don't allow 0's in CLAM addresses.