diweooy has asked for the wisdom of the Perl Monks concerning the following question:
I tought that non-capturing grouping maybe does not work with evaluation modifier 'e' but that was not problem:my $str = 'hello kitty 003x009 spanish'; $str =~ s/^(?:hello kitty )(\d+)(?:x\d+.*)$/sprintf "%d", $1/e; print $str; # result: 3 # expected: 'hello kitty 3x009 spanish'
produces 'XX' as result. does non-capturing work when replacing?$str =~ s/^(?:hello kitty )(\d+)(?:x\d+.*)$/XX/;
|
|---|