if ((ereg("(z+[0-9]{12})", $wm )) or (ereg("(Z+[0-9]{12})", $wm )) ) { echo "ok"; } else { echo "fuck"; }