help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-greedy regexp


From: Michaël Cadilhac
Subject: Re: non-greedy regexp
Date: Mon, 23 Oct 2006 15:52:22 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Robert Pontisso <rpontisso@yahoo.co.uk> writes:

> Hi.  I've  been  having  difficulty  finding  a  non-greedy  regular
> expression to  match a  single instance of  an xml-type tag  pair in
> a line.  Given a line  with several instances of  <foo>...</foo>, is
> there a version of <foo>.*</foo> that won't match everything between
> the beginning of the first pair and closing of the last pair?

Is «<foo>.*?</foo>» what you're looking for?

-- 
/!\ My mail address changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac   |  Si les religions etaient aussi tole-  |
 |         Epita/LRDE Promo 2007   |  rantes qu'elles le pretendent, il y   |
 |  http://michael.cadilhac.name   |  a longtemps qu'il n'y en aurait plus  |
 `--  -   JID: micha@amessage.be --'           -- Moustic              -  --'

Attachment: pgpJvMnfElFRn.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]