
6 Dec
2005
6 Dec
'05
4:15 p.m.
Boris Kolpackov wrote:
John,
"John Maddock" <john@johnmaddock.co.uk> writes:
Following the logic above it will match all single letters in the string, no?
No, because of the trailing $.
The original expression had trailing $ as well but it didn't help much, did it?
So what's the verdict, is this a bug or a feature?
Feature. Perl has the same behavior: $str = 'test.cidl'; $str =~ s/(\.(idl|cidl|cdl))?$/E.idl/g; print "$str\n"; ... prints: testE.idlE.idl -- Eric Niebler Boost Consulting www.boost-consulting.com