`RE2 regex("...")` and then with regex captured in the lambda: `RE2::PartialMatch(line, regex)` should do it.