Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

juniorpires

file_get_contents e preg_match_all

Recommended Posts

Pessoal boa tarde, necessito de ajuda nas expressões regulares. Para retirar as informações que constam na estrutura de tabelas HTML Abaixo. Não sei qual expressão irei usar

 

Dados que necessito :

 

30/07/14 18:40

15/10/14 23:59

AD - ACFT TKOF DE SBEG COM DEST A SBGL DEVEM SEGUIR PELA SEGUINTE<br>RTE PREFERENCIAL:<br>SBGL: UZ6 ISOPI UZ35 LUVSU UZ24 MAVGU)

 

30/05/11 20:14

APP MANAUS FREQ 120.90MHZ CNL<br>REF:AIP-BRASIL AD 2.18<br> AIP-MAP<br> ARC MANAUS<br> ROTAER 3-M)

 

Obrigado desde de já.

<table style="page-break-inside:avoid;" width="100%" class="par">
<thead>
<tr>
<th class="in"> <input id="notam4054971" type="checkbox" name="notam" value="4054971" class="checkboxSBEGAGA check">
</th>
<th class="txt"> <label for="notam4054971">Z0924/2014</label>
</th>
</tr>
</thead>
<tbody>
<tr>
<th>B</th>
<td>
30/07/14 18:40
</td>
</tr>
<tr>
<th>C</th>
<td>
15/10/14 23:59
</td>
</tr>
<tr>
<th>E</th>
<td>AD - ACFT TKOF DE SBEG COM DEST A SBGL DEVEM SEGUIR PELA SEGUINTE<br>RTE PREFERENCIAL:<br>SBGL: UZ6 ISOPI UZ35 LUVSU UZ24 MAVGU)</td>
</tr>
</tbody>
</table>

<table style="page-break-inside:avoid;" width="100%" class="par">
<thead>
<tr>
<th class="in"> <input id="notam3031600" type="checkbox" name="notam" value="3031600" class="checkboxSBEGATM check">
</th>
<th class="txt"> <label for="notam3031600">G1063/2011</label>
</th>
</tr>
</thead>
<tbody>
<tr>
<th>B</th>
<td>
30/05/11 20:14
</td>
</tr>
<tr>
<th>C</th>
<td>
PERM
</td>
</tr>
<tr>
<th>E</th>
<td>APP MANAUS FREQ 120.90MHZ CNL<br>REF:AIP-BRASIL AD 2.18<br> AIP-MAP<br> ARC MANAUS<br> ROTAER 3-M)</td>
</tr>
</tbody>
</table>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Acredito que mais interessante que expressões regulares, seja o uso de DOMDocument, por exemplo DOMDocument::loadHTML.

 

Assim, você pode iterar sobre os nós e obter os dados necessários.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.