#include <algorithm>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

int main() {
	const auto first = "Somebody"s;
	const auto second = "words"s;
	const vector<string> words = { "in"s, "lorem"s, "ipsum"s };
	const auto input = "Somebody has typed in some words here."s;
	const auto start = input.find(first) + first.size();
	const auto finish = input.find(second, start);

	if (start != string::npos && finish != string::npos) {
		istringstream range(input.substr(start, finish - start));

		if (none_of(istream_iterator<string>(range), istream_iterator<string>(), [&](const auto& i) { return find(cbegin(words), cend(words), i) != cend(words); })) {
			cout << "match\n";
		} else {
			cout << "not a match\n";
		}
	} else {
		cout << "not a match\n";
	}

}