I am curently developping a php program but I m have a problem: i have a string and would like to extract a part of it. So I try to use regex but it obviously doesnt work. The code :
<?php
preg_match_all ( '#>+.+Direction+(.)+-+.+/th>#i', $chaine_de_caractere, $direction ); ?>
and a part of the string ;
<th scope="row" class="direction-name"> Direction BLABLA1 - BLABLA2 </th>
<td class="departure-time">
<span>15h30</span>
</td>
I just want to keep "BLABLA1". So where is my error ? thanks for reading have a nice day