graham23s Posted November 29, 2008 Share Posted November 29, 2008 Hi Guys, i am trying to get the text between this html: <td valign="top" class="articletext"> <li>Article Successfully Posted! Waiting for Review.</li> </td> my expression is: <?php // DO A PREG MATCH TO SEE THAT STATUS $findStatus = preg_match("/<td valign=\"top\" class=\"articletext\">(.*)</td>/", $postArticleEZ, $statusFound); print $statusFound[0]; ?> but i am getting this error: Warning: preg_match() [function.preg-match]: Unknown modifier 't' in C:\Program Files\wamp\www\5 i'm not sure what i did wrong! im a noob ont the old reg ex thanks for any help guys Graham Link to comment https://forums.phpfreaks.com/topic/134768-preg-match-problem/ Share on other sites More sharing options...
corbin Posted November 29, 2008 Share Posted November 29, 2008 $findStatus = preg_match("~<td valign=\"top\" class=\"articletext\">(.*)</td>~", $postArticleEZ, $statusFound); The delimiters have to be escaped, so in this case, I would just use a different delimiter. Also, you might need to use multiline mode. (~m) Link to comment https://forums.phpfreaks.com/topic/134768-preg-match-problem/#findComment-701751 Share on other sites More sharing options...
flyhoney Posted November 29, 2008 Share Posted November 29, 2008 <?php // DO A PREG MATCH TO SEE THAT STATUS $findStatus = preg_match("/<td valign=\"top\" class=\"articletext\">(.*)<\/td>/", $postArticleEZ, $statusFound); print $statusFound[0]; ?> Link to comment https://forums.phpfreaks.com/topic/134768-preg-match-problem/#findComment-701812 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.