Tonic-_- Posted February 27, 2011 Share Posted February 27, 2011 This is rather bothering as I know if you use the delimiter / regex pattern s it should ignore newlines preg_match_all("%<p><b>(.*?)</b>%s", $html, $data); Returns a blank array the page data is like so <p> <b>41,910</b><br/> Total Points </p> Never had a problem before that i can recall but for some reason with this page it's giving me issues. Maybe i'm missing something? Link to comment https://forums.phpfreaks.com/topic/229036-preg_match_all-with-newlines/ Share on other sites More sharing options...
silkfire Posted February 27, 2011 Share Posted February 27, 2011 That won't work in any case replace your code with this: preg_match_all('%<p>\s*<b>(.*?)</b>%', $html, $data); Link to comment https://forums.phpfreaks.com/topic/229036-preg_match_all-with-newlines/#findComment-1180399 Share on other sites More sharing options...
Tonic-_- Posted February 27, 2011 Author Share Posted February 27, 2011 Arg, I knew I was missing something, Thanks. Link to comment https://forums.phpfreaks.com/topic/229036-preg_match_all-with-newlines/#findComment-1180402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.