hey everybody:
i have a tricky pattern-matching problem here. i'm terrible at pattern matching (but learning fast). i have successfully used EREG to get rid of some nasty HTML crap that i don't want from a string...however, the results leave some situations like this:
$string = "This is all good and everything. <FONT>But this font tag has got to go<font color=#ff0000>but this font tag has absolutely got to stay</font>as does that end tag</font>but that last /font tag must go for sure";
Do I need to loop a PREG statement? Seems to me I'll need some kind of recursive preg thing going on and i'm frightened by pattern matching...it's so POWERFUL.
any hints?
ALSO: I'm kinda confused about how linebreaks come into play with EREG and PREG...doesn't ^ refer to the 'beginning of the line' or something? My next pattern matching task is to extract the entire BODY of an HTML document minus the <body> and </body> tags and anything before or after.
any help would be much appreciated.