> -----Original Message-----
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, October 16, 2007 2:24 AM
> To: beginners@perl.org
> Subject: Re: Overlapping substitution

> $s = 'One,.,.,.';
> $s =~ s/,\.(?=,|$)/,/g;
> print $s;


Diky moc.  From my naïve view, I don't think I would have attempted to
include the alternation within the zero-width positive look-ahead assertion
without seeing your example.  As you correctly pointed out, I had forgotten
to check the last variable, too.


Kind regards,

Kevin


Kevin Viel, PhD
Post-doctoral fellow
Department of Genetics
Southwest Foundation for Biomedical Research
San Antonio, TX 78227  


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to