
<snip> Basically I need to know how to convert the result of a regex_token_iterator to a C-style string (don't ask...) that I can display using the old-style printf() function. Can anyone out there give me an idea how to implement such a beast? Thanks in advance.
OK, the regex_token_iterator gives you iterators into the existing string, which obviously aren't null-terminated. So you're going to have to call the str() member of sub_match to get a std::string and then you can use the c_ctr() member of that to get a null terminated string: <snip>
Thank you! That's exactly the piece of the puzzle I was missing -- using the str() member of sub_match.
Frankly you would be better off rewriting the output routine to accept iterators, at least your code would be const-correct then :-)
I hear what you're saying about the output routine, but I'm actually writing a few small tools to interact with some older commercial software that exposes a bunch of old C style interfaces -- so I end up having to use C-style strings and old C style coding for everything. Thanks again!