For getting case-insensitive regex search you need to tweak
*gw/urltrans.c*and add somewhere
1004 }
1005 gwlist_destroy(l, octstr_destroy_item);
1006 }
1007
1008 octstr_append_cstr(keyword_regex, ")[ ]*");
1009 } else if (keyword_regex != NULL) {
1010 //ignore case
1011 regex_flag |= REG_ICASE;
1012 }
Because other regex_flag only applied to keyword not keyword_regex
If you don't want to tweak kannel's src, you might consider using [Cc] or
[Aa] for single characters of the word, e.g:
[Cc][Hh][Ee][Ll][Ss][Ee][Aa], for your example I'd suggest using something
like this (not sure if it'd work tho):
keyword-regex = (^([Cc][Hh][Ee]) )|(^([Cc][Hh][Ee][Ll][Ss][Ee][Aa]) )|(
\2$)|( \4$)
\2 \4 should expand [Cc][Hh][Ee] and [Cc][Hh][Ee][Ll][Ss][Ee][Aa]
If you have a lot of words it's generally better to iterate through each of
the words (e.g. for single word - one regex) and stop right after you
matched.
so it would be faster instead of matching through 1 BIG regexp containing
all words.
2012/11/1 Willy Mularto <[email protected]>
> Hi List,
> Need help to solve this keyword-regex issue:
> keyword-regex = ^\w* chelsea|^chelsea|^che$
> aliases = chelsea
> name = chelsea
>
> The goal is Kannel should pass MO started with "any 1 single word followed
> by word chelsea" or "contains chelsea" or "contains che at the end of MO"
> and should be case insensitive. Thanks for any help :)
>
>
>
> Willy Mularto
> F300HD+MR18DE (NLC1725)
>
>
>
>
>
>
>
>
>
>
>