Hello all, I am a new user of Boost Regex++, I have seen some strange behavior from the return of Regex++. Not sure this is the right mailing list to ask such a question or not. If not, please refer me to the right one. Here is my question:

My program is written in MFC, and it has been built under both Visual C++ 6 and Visual Studio .NET 2003.

Under Visual Studio .NET 2003, the following code returns result = 1, however expr[1].c_str() always returns an empty string.

        boost::RegEx expr(itField->GetFieldRegEx(), TRUE);
       
        unsigned int result = expr.Grep(v, wholeFileStr);
        if (result != 0) {

            for (int i = 1;i <= itField->GetMatchNum();i++) {

                const char *buf = expr[i].c_str(); // Get match result

                if (std::strlen(buf) == 0) {

The same code works fine under Visual C++ 6 with the same content inside wholeFindStr.