int len;
char *tmp;
int i;
+ int ReOption=0;
// find the pattern
Delimiter=*buf++;
}
*End++='\0';
+ // get option: currently supported: i=case insensitive
+ while (*End && isalpha(*End)) {
+ if (*End=='i') {
+ ReOption|=PCRE_CASELESS;
+ } else {
+ debuga(__FILE__,__LINE__,_("Invalid option character %c found after regular expression\n"),*End);
+ return(-1);
+ }
+ End++;
+ }
+
// find the alias
for (Replace=End ; *Replace==' ' || *Replace=='\t' ; Replace++);
for (End=Replace ; *End && (unsigned char)*End>' ' ; End++);
}
new_alias->Type=ALIASTYPE_Pcre;
new_alias->Next=NULL;
- new_alias->Regex.Re=pcre_compile(buf,0,&PcreError,&ErrorOffset,NULL);
+ new_alias->Regex.Re=pcre_compile(buf,ReOption,&PcreError,&ErrorOffset,NULL);
if (new_alias->Regex.Re==NULL) {
debuga(__FILE__,__LINE__,_("Failed to compile the regular expression \"%s\": %s\n"),buf,PcreError);
free(new_alias);
# *.mail.live.com
# 65.52.00.00/14 *.mail.live.com
# re:/\.dropbox\.com(:443)?/ dropbox
-# re:/([\w-]+)\.(\w*[a-zA-Z]\w*)(?::\d+)?$/\1.\2
+# re:/([\w-]+)\.(\w*[a-zA-Z]\w*)(?::\d+)?$/ \1.\2
#hostalias /usr/local/sarg/hostalias
# TAG: useralias