preg_match html tags

From: Date: Wed, 02 Mar 2005 20:17:02 +0000
Subject: preg_match html tags
Groups: php.db 
Request: Send a blank email to php-db+get-38741@lists.php.net to get a copy of this message
I am trying to get a string of text in an html page using preg_match. The text starts after the Purpose</p> tag and ends before the next </p> tag. When using preg_match it captures the first </p> tag on the page and not the one after my starting point. Here is my starting point: preg_match("/Purpose\<\/p\>/i", $fpRead, $matches_new) Here is my ending point: preg_match("/<(\/p)>/s", $fpRead,$m_new); I have also tried using offset preg_match("/<(\/p)>/s", $fpRead,$m_new, $matches_new[0]); Does anyone have any suggestions? I also don't know if my syntax is correct for the string </p>... Thanks Any help will be appreciated. Kathy Kathy A Wright | Keane Inc. | Suite: Outside: 617-517-1706 | E-mail: kwright@keane.com [ Mailing: 100 City Sq. Charlestown, MA 02129 USA ]

« previous php.db (#38741) next »