Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Pearl
by
dooglus
on 19/10/2016, 02:42:36 UTC
Helpful, saved aswell thanks!

Code:
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.