Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/01/2011, 13:43
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: Ayuda para obtener parte de un texto

Código PHP:
Ver original
  1. $patron='/\((\d+?)\)/';
  2. $texto="este es el texto (123) y mas texto";
  3. $resultado=preg_match($patron,$texto,$NUMEROS);
  4. print_r($NUMEROS[1]);