torontobb Posted February 25, 2011 Share Posted February 25, 2011 Hi Everyone, I have been successful to parse out some data out of an html page that I am downloading using CURL. I used arrays and preg_match to get the data I need. However, some part of the data has a great deal of SPACE charecters and it seems that my arrays method doesn't work. Can someone please point out how I can parse the following to get only the information out and not tags (****quoted excerpt including all the space characters like it was downloaded): <span class="basic_serial">(777) 777-7777</span> <br /> 1111 ABCD, EFGH, IJKL <br /> Thanks, Link to comment https://forums.phpfreaks.com/topic/228806-how-can-i-parse-data-out-of-the-html-page-i-am-downloading/ Share on other sites More sharing options...
torontobb Posted February 25, 2011 Author Share Posted February 25, 2011 I guess what I am asking is how to parse out line carriage when I using array like this: $regData = array("/<br />(.+)<br />/",); That returns nothing because there is new lines between the two <br /> and I only need the data between the two <br /> Should I do something like: $regData = array("/<br />chr\(13\).chr\(13\).chr\(13\).chr\(13\)(.+)<br />/",); compensating for New Lines. I am clueless.... Any input is appreciated. Link to comment https://forums.phpfreaks.com/topic/228806-how-can-i-parse-data-out-of-the-html-page-i-am-downloading/#findComment-1179793 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.