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