Ver Mensaje Individual
  #414 (permalink)  
Antiguo 25/05/2011, 18:12
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 7 meses
Puntos: 334
Respuesta: Juego: "¿Dónde está el error?"

Cita:
Iniciado por abimaelrc Ver Mensaje

Código PHP:
Ver original
  1. <?php
  2. $string = <<<EOT
  3. A-123
  4. B-abc
  5. EOT;
  6. preg_match('/(?(?<=[A-Z]-)[0-9]{3}|[a-z]{3})/', $string, $matches);
  7. echo $matches[0]; // imprime: 123

siii y citando tu propio mensaje

Cita:
Iniciado por abimaelrc
Ehhh, ¿por qué?
__________________
More about me...
~ @rhyudek1
~ Github