make the regex test more thorough

it seems like the std::regex delivered up to gcc 4.8 has problems with
constructs such as ".+". (at least if they appear at the end of a
regex...)
Merge pull request #626 from andlaus/better_regex_test

make the regex test more thorough