Merge pull request #622 from dmgk/master
Make extract_urls regex more portable
This commit is contained in:
commit
6cab789154
@ -40,7 +40,7 @@ static bool regex_init(void)
|
||||
return true;
|
||||
|
||||
char *regex =
|
||||
"\\b(https?://|ftps?://|news://|mailto:|file://|www\\.)"
|
||||
"\\<(https?://|ftps?://|news://|mailto:|file://|www\\.)"
|
||||
"[-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*"
|
||||
"(\\([-[:alnum:]_\\@;/?:&=%$.+!*\x27,~#]*\\)|[-[:alnum:]_\\@;/?:&=%$+*~])+";
|
||||
int code = regcomp(&url_regex, regex, REG_EXTENDED | REG_ICASE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user