Ignore les majuscules dans regex

This commit is contained in:
Timothée Leclaire-Fournier 2024-01-31 18:02:31 -05:00
parent 071e24b122
commit 1d53321dfd

View File

@ -146,7 +146,7 @@ void GOLTeamH::resize(size_t width, size_t height, State defaultState)
bool GOLTeamH::setRule(std::string const& rule)
{
mParsedRule = 0;
std::regex regexp(R"(B(\d+)/S(\d+))");
std::regex regexp(R"(B(\d+)/S(\d+))", std::regex_constants::icase);
std::smatch m;
if (std::regex_search(rule, m, regexp)) {
@ -529,7 +529,7 @@ std::optional<GOLTeamH::sizeQueried> GOLTeamH::parsePattern(std::string const& p
{
// \[ -> on match le caractère [
// (\d+) -> on match plusieurs caractères de 0-9
std::regex regexp(R"(\[(\d+)x(\d+)\](\d+))");
std::regex regexp(R"(\[(\d+)x(\d+)\](\d+))", std::regex_constants::icase);
std::smatch m;
if (std::regex_search(pattern, m, regexp))