On Mon, 12 Jan 2004, Andreas Aardal Hanssen wrote:
I'll see if changing this behavior will make Mozilla more happy. I can provide you with a patch once I've done some debugging.
Here's the patch, see if it helps:
--- src/convert.h.orig 2004-01-12 22:50:50.000000000 +0100 +++ src/convert.h 2004-01-12 22:49:47.000000000 +0100 @@ -239,19 +239,27 @@ inline std::string toRegex(const std::string &s_in, char delimiter) { std::string regex = "^"; + + char lastChar = '\0'; for (std::string::const_iterator i = s_in.begin(); i != s_in.end(); ++i) { if (*i == '.' || *i == '[' || *i == ']' || *i == '{' || *i == '}' || *i == '(' || *i == ')' || *i == '^' || *i == '$' || *i == '?' || *i == '+' || *i == '\\') { regex += "\\"; regex += *i; - } else if (*i == '*') + } else if (*i == '*') { + if (lastChar == delimiter) + regex += "?"; regex += ".*?"; - else if (*i == '%') { + } else if (*i == '%') { + if (lastChar == delimiter) + regex += "?"; regex += "[^\\"; regex += delimiter; regex += "]*?"; } else regex += *i; + + lastChar = *i; }
if (regex[regex.length() - 1] == '?')
Hi
Thanks a lot for your help. I assume this patch will be incorporated in the future releases. because I installed bincimap as rpm
sincerely
Lin -- Leonard Lin M�llerwis 21 CH - 8606 Greifensee Switzerland
phone +41 (0)1 941 40 53 mobile +41 (0)79 416 01 07 email [EMAIL PROTECTED]
