Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Pearl
by
cloverme
on 04/03/2015, 13:21:55 UTC
does anybody know how to validate a CLAM address with PHP?

This works... using the regex from Nixsy:

Code:
$regex = "/^[x][a-km-zA-HJ-NP-Z0-9]{26,33}$/";
if (preg_match($regex, "xWEWfhF9hDvKksvWgFj6kmseLYShZG9Kx8")) {
    // match success
    echo "Found a match!";
} else {
    // If preg_match() returns false, then the regex does not
    // match the string
    echo "The regex pattern does not match. :(";
}