3 Aug
2006
3 Aug
'06
6:21 a.m.
Tommy Li wrote:
I've tried matching like this:
std::string input = filecontents; boost::regex re_paragraphs("\\n\\n");
boost::sregex_token_iterator input_token_it(input.begin(), input.end(), re_paragraphs, -1); boost::sregex_token_iterator end_token_it;
for( ; input_token_it != end_token_it; input_token_it++ ) { output += "TOKEN FOUND" } return output;
But this never works. It matches when I use a part of a word as a token. The problem is that it's just not matching the newlines. I've looked into the input's hex and there are indeed two newline chars consecutively.
I think I'm missing something obvious. Anyone have any idea?
By the way, I can't even match one newline char with "\\n" though they are obviously there.