aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-utils.c5
-rw-r--r--libempathy/empathy-utils.h1
2 files changed, 6 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]"
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 5ebaac069..6aab7cf00 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -44,6 +44,7 @@ G_BEGIN_DECLS
typedef enum {
EMPATHY_REGEX_AS_IS,
EMPATHY_REGEX_BROWSER,
+ EMPATHY_REGEX_APT,
EMPATHY_REGEX_EMAIL,
EMPATHY_REGEX_OTHER,
EMPATHY_REGEX_ALL,