Amend 3736bee4: Forgot to set the cassensitivity flag in regex statement

This commit is contained in:
Kornel Benko 2020-12-27 12:16:37 +01:00
parent 3736bee4b7
commit c7bc46d707

View File

@ -2884,10 +2884,15 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions const &
regexp2_str = "(" + lead_as_regexp + ").*?" + par_as_string; regexp2_str = "(" + lead_as_regexp + ").*?" + par_as_string;
} }
LYXERR(Debug::FIND, "Setting regexp to : '" << regexp_str << "'"); LYXERR(Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
regexp = regex(regexp_str);
LYXERR(Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'"); LYXERR(Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
regexp2 = regex(regexp2_str); if (! opt.casesensitive) {
regexp = regex(regexp_str, std::regex_constants::icase);
regexp2 = regex(regexp2_str, std::regex_constants::icase);
}
else {
regexp = regex(regexp_str);
regexp2 = regex(regexp2_str);
}
} }
} }