diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 7148980b..a4457bcc 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -952,7 +952,9 @@ private: case ParsedRegex::Class: { auto& character_class = m_parsed_regex.character_classes[node.value]; - if (character_class.ctypes == CharacterType::None and not character_class.negative) + if (character_class.ctypes == CharacterType::None and + not character_class.negative and + not character_class.ignore_case) { for (auto& range : character_class.ranges) { @@ -1440,6 +1442,11 @@ auto test_regex = UnitTest{[]{ kak_assert(vm.exec("FooFOoBb")); } + { + TestVM<> vm{R"((?i)[a-z]+)"}; + kak_assert(vm.exec("ABC")); + } + { TestVM<> vm{R"([^\]]+)"}; kak_assert(not vm.exec("a]c"));