Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/07/2010, 00:06
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 2 meses
Puntos: 20
Buscar dentro de subpatron PCRE

Buenas,

Tengo la siguiente expresión regular

<tr.+?>(.+?)<\/tr>

la cual me captura cosas por el estilo:


Código:
<td class="shirtnumber">16</td><td class="player large-link"><a href="/players/diego-capel-trinidad/18029/" class="flag_16 left_16 spain_16_left">Diego Capel</a> <img src="http://static.web.com/gsmf/96/img/events/SO.gif" width="13" height="13" title="Sustituído" alt="Sustituído" /></td><td class="bookings"></td>

<td class="shirtnumber">12</td><td class="player large-link"><a href="/players/frederic-kanoute/3122/" class="flag_16 left_16 mali_16_left">F. Kanouté</a></td><td class="bookings"></td>

<td class="shirtnumber">8</td><td class="player large-link"><a href="/players/albert-crusat-domene/17889/" class="flag_16 left_16 spain_16_left">Albert Crusat</a> <img src="http://static.web.com/gsmf/96/img/events/SO.gif" width="13" height="13" title="Sustituído" alt="Sustituído" /></td><td class="bookings"><span><img src="http://static.web.com/gsmf/96/img/events/YC.gif" width="12" height="13" /> 13'</span></td>
¿Se puede buscar dentro de esa PCRE? por ejemplo extraer el nombre de los jugadores? (Diego Capel, F. Kanouté y Albert Crusat) utilizando algún sub-patrón?

Me podéis poner un ejemplo...?

Muchas gracias de antemano!