🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Ayuda con expresiones regulares

#517
From: gamo
Date: Sat, 14 Apr 2007 09:41
50 lines
2917 bytes
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-1125794192-1176543676=:20579
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Fri, 13 Apr 2007, Gonzalo P=E9rez de Olaguer C=F3rdoba wrote:

> > se cumple siempre, para cualquier cadena.
>=20
> ten en cuenta que estamos hablando de una cadena para la que
> se ha verificado que tiene 7 caracteres. No se cumple, por
> ejemplo, para "1 3 5 7". S=ED para "1234   ".

Efectivamente. Luego queda el segundo inconveniente.

>=20
> > Adem=E1s de ser glotones, los * inducen a muchos errores.
> > Saludos cordiales
>=20
>=20
He hecho 3 pruebas: sin regex, con mi regex del segundo post y=20
algo similar a lo que proponeis vosotros con el *

Los resultados son estos:=20

           Rate      * A PELO  REGEX
*      568030/s     --    -5%    -5%
A PELO 598943/s     5%     --    -0%
REGEX  599907/s     6%     0%     --

y conste que me sorprendi=F3 que no ganase A PELO, ya que en comparaciones
2 a 2 antes s=ED que ganaba con un 3% (depende mucho de las cadenas de=20
prueba que le metas). Si el lenguaje no es Perl, dudo mucho que=20
merezca la pena usar regex.=20
 =20
Saludos cordiales=20


>=20
> --=20
> Gonzalo P=E9rez de Olaguer C=F3rdoba <gpoc@iies.es>
> PGP key 2861C704 --- F206 5671 6789 425D 111C  1302 214F 1934 2861 C704
>=20

--=20
http://www.telecable.es/personales/gamo/
perl -e 'print 111_111_111**2,"\n";'
--8323328-1125794192-1176543676=:20579--
Technical Details
Message-ID: <Pine.LNX.4.64.0704141131590.20579@jvz.es>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!news.rediris.es!newsfeed.uniovi.es!newsfeed.telecable.es!cm-83-97-181-149.telecable.es!amo
References: <fA7Rh.3556107$D7.6476545@telenews.teleline.es> <Pine.LNX.4.64.0704071129260.16935@jvz.es> <VA.00000b9c.0184af7a@agujero-negro.escomposlinux.org> <20070413004801.64ab0001@petres.salonet.snet> <Pine.LNX.4.64.0704131613140.20123@jvz.es> <20070413220316.2a1d0794@petres.salonet.snet>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,dd1337191e711daf
X-Google-Attributes: gidf86c8,public
X-Google-Language: SPANISH,ASCII
Newsgroups: es.comp.os.linux.programacion
Date: Sat, 14 Apr 2007 11:41:16 +0200
From: gamo <gamo@telecable.es>
X-X-Sender: amo@jvz.es
Reply-To: gamo@telecable.es
Subject: Re: Ayuda con expresiones regulares
In-Reply-To: <20070413220316.2a1d0794@petres.salonet.snet>
Message-ID: <Pine.LNX.4.64.0704141131590.20579@jvz.es>
References: <fA7Rh.3556107$D7.6476545@telenews.teleline.es>
 <Pine.LNX.4.64.0704071129260.16935@jvz.es> <VA.00000b9c.0184af7a@agujero-negro.escomposlinux.org>
 <20070413004801.64ab0001@petres.salonet.snet> <Pine.LNX.4.64.0704131613140.20123@jvz.es>
 <20070413220316.2a1d0794@petres.salonet.snet>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1125794192-1176543676=:20579"
NNTP-Posting-Host: 83.97.181.149
X-Trace: filemon1.isp.telecable.es 1176543501 83.97.181.149 (14 Apr 2007 11:38:21 +0200)
Organization: TeleCable, S.A.U.
Lines: 50
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!switch.ch!news.rediris.es!newsfeed.uniovi.es!newsfeed.telecable.es!cm-83-97-181-149.telecable.es!amo