表达式正则错误,preg_match 3


Error in expression regular with preg_match 3

<td><strong>Puesto:</strong></td>
<td>PUESTO CABECERA MUNICIPAL                                                                                               </td>

我有这个表达式常规

preg_match("%<td><strong>Puesto:</strong></td><td>(.*)<'/td>%si",$data,$puesto); 但不起作用

你可能想要这个:

$ok = preg_match('%<strong>Puesto:</strong>.+?<td>(.+?)</td>%si', $data, $puesto);

别忘了用?把表情变成不贪婪!