Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-11-15 04:27:18


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net