url parser: fix regexp for minus sign (must be at the end of the regexp group)

This commit is contained in:
Jaroslav Kysela 2014-07-09 15:05:15 +02:00
parent fc0211fc29
commit 1f5895ce84

View file

@ -142,9 +142,9 @@ urlparse_done( void )
/* URL regexp - I probably found this online */
// TODO: does not support ipv6
#define UC "[a-z0-9_\\-\\.!£$%^&]"
#define UC "[a-z0-9_\\.!£$%^&-]"
#define PC UC
#define HC "[a-z0-9\\-\\.]"
#define HC "[a-z0-9\\.-]"
#define URL_RE "^([A-Za-z]+)://(("UC"+)(:("PC"+))?@)?("HC"+)(:([0-9]+))?(/[^\\?]*)?(.([^#]*))?(#(.*))?"
static regex_t *urlparse_exp = NULL;