Forum Moderators: coopster
i want to go through a file and find every occurance of a certain start tag, then put the contents following that indicator into a string up to the end tag.
eg storing a list of all links on a web page
i can use preg_match to find the start tag but then am a bit stumped after that ...
any ideas?
Simplified example:
preg_match_all('/<a href="[^"]*">([^<]*)<\/a>/i',$htmlText,&$result);
Print_r($result);
$result[0] should be an array of all full matches, $result[1] an array of all first subpattern matches and so on.
SN