Narks
Vastly intelligent whale-like being from the stars
- Reaction score
- 90
So I have a web page stored in a string var, and it has a whole bunch of stuff like this:
<td>asldkfmasdf</td><td>more stuff</td> etc...
What I want to do is tokenize the web page, to extract the text between the td tags, then strip any html tags inside the extracted text (probably by removing < and > characters).
I'm really a novice when it comes to php, and I think I need to use regular expressions and preg_match to get all the information into a string array. I'm having trouble coming up with a regex for:
<td> at start of string
</td> at end of string
Can someone help me out?
<td>asldkfmasdf</td><td>more stuff</td> etc...
What I want to do is tokenize the web page, to extract the text between the td tags, then strip any html tags inside the extracted text (probably by removing < and > characters).
I'm really a novice when it comes to php, and I think I need to use regular expressions and preg_match to get all the information into a string array. I'm having trouble coming up with a regex for:
<td> at start of string
</td> at end of string
Can someone help me out?