Stuck on a (rather simple) regex problem in PHP.
Buried in a mess of text is this section:
<tr>
<td id="descriptionArea">
Customer request to remove "Intro - 01/13/09" video clip.
<br/>
</td>
</tr>
I want whatever is between:
descriptionArea">
...and...
</td>
A friend suggested:
$pattern = '<td="descriptionArea">\s*(.*?)\s*<';
$clean = preg_replace("'[\n\r\s\t]'","",$text); // to rid of line breaks
preg_match($pattern, $clean, $matches);
print_r($matches);
But I get the following error:
Warning: preg_match() [function.preg-match]: Unknown modifier 'q'
I suppose the second question is whether preg_match is the correct PHP function for this, also. Should I be using ereg instead? Thanks for your help.