一个简单的preg_match难题[重复]

This question already has an answer here:

A quick preg_match query...

I have some html like this...

<html>
...
lots of irrelevant stuff
...
<th>
Full name:</th>
<td>
John Smith</td>
</tr>
...
</html>

And here's my preg string

'/<th>\s*Full name:\s*<\/th>\s*<td>(.*)<\/td>/i'

I'm trying to grab 'John Smith', but I'm just drawing blanks. Any ideas?

</div>

Because the . in .* does not match newlines. You can either use \s*(.*), which you probably want, or use the s modifier.