RE: [PHP] Extract HTML tags

2002-10-09 Thread Smith, Benjamin
There are a couple of ways you could do it, the proper way with a regular expression, or you could just kludge it using explode() and chucking out the stuff you did not need. -Original Message- From: Shawn McKenzie [mailto:[EMAIL PROTECTED]] Sent: Thursday, 10 October 2002 7:43 AM To:

Re: [PHP] Extract HTML tags

2002-10-09 Thread Jonathan
try something along the lines of: preg_match('/body[^]*([.]*)/body/im', $string, $foo); $foo[1] = 'your body string'; preg_match('/head([.]*)body/im', $string, $bar); $bar[1] = 'your head string'; while not tested (and probably off a little) this should get you going... -js Shawn McKenzie