[nycphp-talk] Regex for P Elements
Randal Rust
randalrust at gmail.com
Wed Jan 12 09:25:19 EST 2011
On Wed, Jan 12, 2011 at 9:20 AM, Dan Cech <dcech at phpwerx.net> wrote:
> Good call, I missed the multiple-line thing. In this situation though you'd
> actually want /s like:
>
> $blockpattern='/<p[^>]*>.*?<\/p>/s';
That's it. I tried it with /m, but it gave me 0 results. Replaced with
/s and now I have the array of 33 paragraphs, as expected. Thanks for
the help!
--
Randal Rust
R.Squared Communications
www.r2communications.com
www.facebook.com/r2communications
614-370-0036
More information about the talk
mailing list