Re: Help with preg_match_all()
| From: | Francisco Javier Escoppinichi Fernández | Date: | Mon, 01 Nov 2004 04:12:43 +0000 |
| Subject: | Re: Help with preg_match_all() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200803@lists.php.net to get a copy of this message | ||
Thanks!
Worked like a charm!
*Problem solved*
On Mon, 1 Nov 2004 03:01:12 +0000, Curt Zirzow
<php-general@zirzow.dyndns.org> wrote:
> * Thus wrote Francisco Javier Escoppinichi Fernndez:
> > Hello people...
> >
> > I'm relatively a beginner with regular expressions, so I need a little
> > help here.. I hope you can help me...
>
> If you read the whole section @ http://php.net/pcre you'll
> be able
> to do this in your sleep.
>
> >
> > Ok, I have a HTML file with several tags like this:
> > {$base.username}
> > {$base.date}
> > {$blog.lastpost}
> >
> > And so on.. It's a kind of a template system... well... I need to
> > create a expression to get all the tags from the HTML with
> > preg_match_all() in order to have them in a array...
>
> So your looking from something that starts with '{' and continues
> while not a ')' ...
>
> /{([^}]*?)}/
>
> Curt
> --
> Quoth the Raven, "Nevermore."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Francisco Javier Escoppinichi Fernández
Email: fjefdez@gmail.com
Web: http://www.fire-dragon.net/
MSN: dragon@fire-dragon.net
Cel: 044 (612) 348 91 00
"Sólo hay 3 cosas que no vuelven atrás: la palabra emitida, la flecha
lanzada y la oportunidad perdida."