
On Sun, 12 Sep 2004 12:53:56 -0400 (EDT), Andrew Dennison
string: "orange and ba.ana and kiwi" expression: "\\.([a-z]+).*[ \t\n].*\\.([a-z]+)"
Looks like you mean "." at the beginning, not "\\." judging by the code below.
expected result: match, captures 'range' and 'ana' real result: no match
The code in question is this: [ ... ] result = regex_match(str, what, e);
According to the documentation, regex_match only finds matches that
consume ALL of the input text. You want regex_search. A test program
is attached. I double-backslashed the \t and \n, but verified that
either version works.
#include <string>
#include <iostream>
#include <iterator>
#include