15 Nov
2007
15 Nov
'07
9:27 a.m.
Andrew Holden wrote:
Maximilian Wilson wrote:
It seems counter-intuitive to me that consuming an entire string should leave an empty string behind. After all, after that empty string is consumed, there's still another empty string, and another, etc.
I agree. However, the following Perl program demonstrates the same behavior, so it isn't just Boost.Regex. Since Boost.Regex attempts to emulate Perl by default, this "bug" is correct.
#Begin Perl sample #! /usr/bin/perl
$v = 'Test'; $v =~ s/(.*)/R_$1/g; print "$v\n"; #Prints "R_TestR_" #End Perl sample
Right, this change was deliberate, and was made in response to a bug report. HTH, John.