aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy/empathy-utils.c')
-rw-r--r--libempathy/empathy-utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 9132cbfc9..2c7ce1de0 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -58,6 +58,7 @@ empathy_substring (const gchar *str,
/*
* Regular Expression code to match urls.
*/
+#define APTCHARS "-A-Za-z0-9,-."
#define USERCHARS "-A-Za-z0-9"
#define PASSCHARS "-A-Za-z0-9,?;.:/!%$^*&~\"#'"
#define HOSTCHARS "-A-Za-z0-9_"
@@ -91,6 +92,10 @@ regex_init (void)
"(www|ftp)[" HOSTCHARS "]*\\.[" HOSTCHARS ".]+"
"(:[0-9]+)?(" URLPATH ")?";
break;
+ case EMPATHY_REGEX_APT:
+ expression =
+ "apt://[" APTCHARS "]*";
+ break;
case EMPATHY_REGEX_EMAIL:
expression =
"(mailto:)?[a-z0-9][a-z0-9.-]*@[a-z0-9]"