I submit the patch to use memchr2() for case-insensitive matching in bmexec(). It counts last characters of the patterns in kwsprep(), if it's just two, use memchr2(). The new version uses memchr() still, if last character of the pattern is non-alphabetical. Norihiro