[32164] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3429 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 29 16:09:20 2011

Date: Wed, 29 Jun 2011 13:09:03 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 29 Jun 2011     Volume: 11 Number: 3429

Today's topics:
    Re: doing fiddly processing on repeated matches <derykus@gmail.com>
        rtedit <r@thevoid1.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 29 Jun 2011 12:41:00 -0700 (PDT)
From: "C.DeRykus" <derykus@gmail.com>
Subject: Re: doing fiddly processing on repeated matches
Message-Id: <2e4f0386-26ef-4adf-a7cf-5e6894ffa64b@p30g2000prp.googlegroups.com>

On Jun 27, 6:12=A0am, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
> Uri Guttman wrote:
> >>>>>> "b" =3D=3D bugbear<bugbear@trim_papermule.co.uk_trim> =A0writes:
>
> > =A0 =A0b> =A0I have the "obvious" match to apply to my large xml string=
:
>
> > =A0 =A0b> =A0 while($s =3D~ m@(<\s*[^\?][^>]+>)@gm) {
> > =A0 =A0b> =A0 }
>
>  ....

> > =A0 =A0while( $s =3D~ s/(<\s*[^\?][^>]+>)/ replace_tag( $1 ) /eg {
>
> > this doesn't grab the<> =A0and is better for that reason:
>
> > =A0 =A0while( $s =3D~ s/<\s*([^\?][^>]+)>)/ replace_tag( $1 ) /eg {
>
> ...

Another amenity since 5.10 are named capture
buffers which can make it easier to spot the
what's going on in the regex:


   while( $s =3D~ s{ <\s* (?tag [^\?] [^>]+ )> ) }
                 { replace_tag($+{tag}) }xeg )
    {
            ...

--
Charles DeRykus




------------------------------

Date: Wed, 29 Jun 2011 13:31:57 -0600
From: robin <r@thevoid1.net>
Subject: rtedit
Message-Id: <iufujp$hkb$1@speranza.aioe.org>

anyone know how to design a tk module that is a richtext box?

-r


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3429
***************************************


home help back first fref pref prev next nref lref last post