Re: Regex to catch <p>s
| From: | Eric Butera | Date: | Tue, 06 May 2008 02:10:29 +0000 |
| Subject: | Re: Regex to catch <p>s | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273927@lists.php.net to get a copy of this message | ||
On Mon, May 5, 2008 at 9:59 PM, Ryan S <genphp@yahoo.com> wrote:
> To say I suck at regex is an understatement so really need any help I can get on this, I have
> a page of text with different html tags in them, but each "block" of text has a <p>
> or a < class="something"> tag... anybody have any regex that will catch each of
> these paragraphs and put then into an array
If you're using php5 you can use DOM's getElementsByTagName.
If you still think you need to do some sort of regex it is possible
but it will be buggy at best.