preg_match_all unclosed tag problem
Posted: Thu Sep 10, 2009 3:11 am
Hi,
I'm working on a website scrape script. I need to get just a text between the tags, the problem is that some of the tags are not closed. Here's an example:
The second opening tag, does not have a closing tag. I was thinking this expression might work:
But nothing gets returned. I guess the preg_match needs a 'closing' identifier or probably I'm just way off track. Any guidance is much appreciated. Thanks!
I'm working on a website scrape script. I need to get just a text between the tags, the problem is that some of the tags are not closed. Here's an example:
Code: Select all
<tag>some text</tag>
<tag>more text
<tag>even more text</tag>Code: Select all
#<tag>(.*?)#is