NYCPHP Meetup

NYPHP.org

[nycphp-talk] Question about REGEX's...

Chris Merlo chris at theyellowbox.com
Tue Nov 28 20:00:16 EST 2006


On 11/28/06, Anthony Papillion <anthony at adcl.biz> wrote:
>
>  Hello Everyone,
>
> I am using the following regex to retrieve text between two <div> tags.
>
> $trans_text = preg_match(/<div id=result_box dir=ltr>(.+?)</div>/);
>

Don't you need to surround the pattern in quotes?  I always have.
-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20061128/64a55582/attachment.html>


More information about the talk mailing list