[nycphp-talk] Question about REGEX's...
Paul Houle
paul at devonianfarm.com
Tue Nov 28 19:56:13 EST 2006
Anthony Papillion 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>/);
>
> However, the parser keeps telling me it expects a ) but found /
> instead. What am I doing wrong?
It's probably the / in /div. Try
...<\/div>/
More information about the talk
mailing list
Automatic Email Organization without missing anything!