🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #9187

Re: Expresiones regulares (II)

#9187
From: Fernando Arbeiza
Date: Sat, 24 Aug 2002 11:56
25 lines
2031 bytes
Hola:

On 24 Aug 2002 11:22:07 GMT, Alvaro Sanchez-Mariscal
<mariscal-NOSPAM@di.uc3m.es> wrote:
>>     <table>.*?</table>
> 
> Si a cada uno de ellos les a�ades "?", estar�s obligando a que
> ocurran, como m�nimo, ese n�mero de veces.
> 
> La necesidad de especificar el cuantificador m�ximo y m�nimo se debe a
> que por defecto, Perl intenta encontrar la mayor porci�n de la
> variable que conincide con el patr�n a buscar.

Ahora que hablamos sobre esto, tengo una pregunta. Lo del "?" para tener
la menor porci�n que coincida funciona en Perl (y en Ruby), pero
�alguien sabe como se conseguir�a lo mismo con sed (o awk, porque creo
que los dos utilizan parecidas expresiones regulares)? Porque por m�s
que lo intento, no lo consigo.

Gracias.

-- 
Fernando Arbeiza
arbeizaf [arroba(at)] ono [punto(dot)] com
LFS en castellano:  <URL:http://www.escomposlinux.org/lfs-es>
Technical Details
Message-ID: <slrnamet3r.fl4.direccion_en_la_firma.address_in_signature@jupiter.olimpo>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!sc1-tr-u-0039.mc.onolab.COM!not-for-mail
References: <3D66CF2D.6040907@yahoo.es> <slrnamenll.dq2.direccion_en_la_firma.address_in_signature@jupiter.olimpo> <ak7q8v$1g7qk1$3@ID-146972.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,89fc7e4845da3e67
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-08-24 05:08:54 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!sc1-tr-u-0039.mc.onolab.COM!not-for-mail
From: Fernando Arbeiza <direccion_en_la_firma.address_in_signature@homelinux.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Expresiones regulares (II)
Date: Sat, 24 Aug 2002 13:56:43 +0200
Lines: 25
Message-ID: <slrnamet3r.fl4.direccion_en_la_firma.address_in_signature@jupiter.olimpo>
References: <3D66CF2D.6040907@yahoo.es> <slrnamenll.dq2.direccion_en_la_firma.address_in_signature@jupiter.olimpo> <ak7q8v$1g7qk1$3@ID-146972.news.dfncis.de>
NNTP-Posting-Host: sc1-tr-u-0039.mc.onolab.com (62.42.152.40)
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: fu-berlin.de 1030190433 50599685 62.42.152.40 (16 [148301])
X-Orig-Path: jupiter.olimpo!news
User-Agent: slrn/0.9.7.4 (Linux)