flags_str = flags;
}
- regexp_flags |= PCRE_UTF8 ;
+ rspamd_flags |= RSPAMD_REGEXP_FLAG_RAW;
+ regexp_flags &= ~PCRE_UTF8;
if (flags_str != NULL) {
while (*flags_str) {
regexp_flags |= PCRE_EXTENDED;
break;
case 'u':
- regexp_flags |= PCRE_UNGREEDY;
+ rspamd_flags &= ~RSPAMD_REGEXP_FLAG_RAW;
+ regexp_flags |= PCRE_UTF8;
break;
case 'O':
/* We optimize all regexps by default */
{'m,test,', 'test123', false},
{'m{https?://[^/?\\s]+?:\\d+(?<!:80)(?<!:443)(?<!:8080)(?:/|\\s|$)}', '', false},
{'/test/i', 'TeSt123', true},
- {'/тест/i', 'ТесТ', true},
+ {'/ТесТ/iu', 'тест', true},
-- Raw regexp
{'/\\S<[-\\w\\.]+\\@[-\\w\\.]+>/r', 'some<example@example.com>', true},
-- Cyrillic utf8 letter