Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
4.6.3
-
None
Description
Here are three samples which are not working properly. The same samples but using QRegexp( "(.+)" ) work fine.
std::cout << QString( "lol" ).replace( QRegExp( "(.*)" ), "\\1 GG" ).toAscii().data() << std::endl; // "lol GG" expected but "lol GG GG" received std::cout << QString( "lol lol" ).replace( QRegExp( "(.*)" ), "S" ).toAscii().data() << std::endl; // "S' expected but "SS" received std::cout << QString( "lol" ).replace( QRegExp( "(.*)" ), "GG\\1" ).toAscii().data() << std::endl; // "GGlol" expected but "GGlolGG" received