
15 May
2009
15 May
'09
3:54 p.m.
Hello Anthony
Regex does not keep a copy of the string, but instead uses the passed in string. The result of the filename method is going out of scope immediately after the regex_match call, and the memory in match.str() is invalid.
Thanks a lot. I did not realize that the iterators have to survive the call but it is obvious now. Regards, Peter.