20 Jun
2002
20 Jun
'02
10:53 a.m.
Well, I don't think, it's a compiler problem. stringbuf::str() retuns a temporary string. This is passed on to regex_match(). The real problem is, the data in matchInfo is not stored as a copy of the processed string, but as a reference to its characters. So, when the temoprary string is being destroyed, the result in matchInfo is also lost.
Yes of course, sorry I was being particularly dense. The storing of iterators is *by design*, I don't want the overhead of copying an arbitrarily large amount of text, and in any case you need the iterators in order to do search and replace operations... John Maddock http://ourworld.compuserve.com/homepages/john_maddock/index.htm