Re: REGEX Question
| From: | Don Read | Date: | Wed, 18 Jun 2003 07:21:07 +0000 |
| Subject: | Re: REGEX Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151930@lists.php.net to get a copy of this message | ||
On 17-Jun-2003 Ron Dyck wrote:
> I need to match text between two html comment tags.
>
> I'm using: preg_match("/<!--start_tag-->(.*)<!--end_tag-->/", $data,
> $Match)
>
> Which work fine until I have carriage returns. The following doesn't
> match:
>
Use the m (multiline) modifier:
preg_match("/<!--start_tag-->(.*)<!--end_tag-->/m", ...
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.