Why would this regex return an error?
问题 Why does the following evaluate to true ? if(preg_match_all('%<tr.*?>.*?<b>.*?</b>.*?</tr>%ims', $contents, $x)===FALSE) {...} $contents , is retrieved using file_get_contents() from this source. The regex was simplified to troublshoot the problem. The code I was actually using was: if(preg_match( '%Areas of Study: </P>.*?<TABLE BORDER="0">(.*?)<TBODY>.*?</TBODY>.*? </TABLE>%ims', $contents, $course_list) ) { if(preg_match_all('%<TR>.*?<TD.*?>.*?<B>(.*?)</B>.*?</TD>.*?<TD.*?>.*?</TD>.*?<TD.*?