I apologize, I realized after I sent it that there may have been more involved in the problem than I initially thought - I'm pretty sure the program's dying during the function calls, but as you point out, it may be just the rest of my program being lax with memory and using it all up, precipitating the problem. I was just getting frustrated and sometimes a night to sleep on it can help - I will try to double-check all the code, particularly the functions that allocate memory for the file contents (which then gets fed to RegEx...), and what values are getting passed to the library functions. If I still can't figure it out I'll try to do a more thorough trace.
~~~~~~~~~~~~~~~~~~~ One other thing I forgot to mention: some early VC6 versions did have an optimizer bug that effected std::string (and maybe other std lib code as well as the Boost.Regex which depends upon it), however provided you are up to date with service pack 5, then this should be a non-issue. The fix BTW was to build with /Oityb1 rather than /O2. John.