On Sep 5, Jeff 'japhy/Marillion' Pinyan said:

>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...

Err, rather, it looks like /(?:[^X]*X)+?YZ/.

-- 
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]

Reply via email to