<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);
别忘了用?
把表情变成不贪婪!