On Sep 5, Curtis Poe said:
> my $instr1 = "111{first first}222 333{second}444";
> $_ = $instr1;
> my @outstr = m/{([^}]+)}/g;
>
>Also, I stripped out your dot star and replaced it with a negated character class.
>See
>http://www.perlmonks.org/index.pl?node_id=24640 for why this is done.
Recent Perls have buffed up /.*?XYZ/ to be rather efficient, and something
along the lines of /[^X]*(?:X[^X]*)*?YZ/. Actually, let me see if that
construction is as efficient...
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to parse a string with ..{..}..{..}..
Jeff 'japhy/Marillion' Pinyan Wed, 05 Sep 2001 16:57:10 -0700
- How to parse a string with ..{..}..{..}.. Families Laws
- Re: How to parse a string with ..{..}..... Curtis Poe
- Re: How to parse a string with ..{..}..... Jeff 'japhy/Marillion' Pinyan
- Re: How to parse a string with ..{.... Jeff 'japhy/Marillion' Pinyan
