I would recommend using DOMDocument instead of regex.

Thank You
Chuck Reeves




2010/11/19 Peter Sawczynec <p...@blu-studio.com>

> I need to be able to grab the first 10 words or so from a HTML laden text
> string that is held in a db table field where the typical field content
> might be as follows below. After the processing, being left with only the
> straight text with punctuation would be fine
>
>
>
> <p><img src="/files/Screen%20img.png" alt="Fresh food makes for a great
> snack." width="180" height="272" style="float: right;" /> </p>
>
> <p>Target bodu content begins here <em>and</em> may have any html tags
> interspersed. Plus, users can users can use parens (anywhere) too.</p>
>
> <br />------<br />
>
> <p>Another paragraph</p>
>
>
>
> I'm checking to see if over the years a best practice technique with regexp
> or php funcs has been established to readily sove this classic display
> challenge.
>
>
>
> Thanks for any <input />.
>
>
>
> Warmest regards,
>
>
>
> Peter Sawczynec
>
> Technology Dir.
>
> blūstudio
>
> 941.893.0396
>
> p...@blu-studio.com <p...@sun-code.com>
>
> www.blu-studio.com
>
>
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to