13const std::regex gShortDateRegex(R
"(\b\d{2}\.\s*\d{2}\b)");
14const std::regex gFullDateRegex(R
"((\d{2}\.\d{2}\.\d{4}))");
23 return std::regex_search(text, gShortDateRegex);
38 if (std::regex_search(text, match, gFullDateRegex))
return match.str(1);
Declares date-detection helpers for the import parser.
bool containsShortDate(const std::string &text) noexcept
Checks whether the text contains any short date pattern.
std::optional< std::string > findFirstFullDate(const std::string &text) noexcept
Finds the first full date in a text fragment.
bool hasShortDateToken(const std::string &text) noexcept
Checks whether the text contains a short date token.