Módulo de sitio
De ActionApps Documentacion
Contenido
Validación de cadena de estado
<?php $apc = 'I---xxxx11'; $patron = "/^([a-zA-Z])(-|[a-zA-Z])(-|[a-zA-Z])(-|[a-zA-Z])(-|[a-zA-Z0-9]{1,4})(-|[0-9]+)(-|[0-9-]+)$/s"; preg_match($patron,$apc,$vars); list($anterior,$s,$e,$r,$a,$t,$p,$x) = $vars; echo "apc=".$apc."<br>"; echo "s=".$s."<br>"; echo "e=".$e."<br>"; echo "r=".$r."<br>"; echo "a=".$a."<br>"; echo "t=".$t."<br>"; echo "p=".$p."<br>"; echo "x=".$x."<br>"; ?>