url_regex.hh: make path component optional
This commit is contained in:
parent
b06873bf98
commit
ca0df9cdf5
|
@ -9,7 +9,7 @@
|
||||||
#define PORT "(?:\\:[[:digit:]]{1,5})?"
|
#define PORT "(?:\\:[[:digit:]]{1,5})?"
|
||||||
#define SCHEME "(?:[[:alpha:]][+-.[:alnum:]]*:)"
|
#define SCHEME "(?:[[:alpha:]][+-.[:alnum:]]*:)"
|
||||||
#define USERPASS USERCHARS_CLASS "+(?:" PASSCHARS_CLASS "+)?"
|
#define USERPASS USERCHARS_CLASS "+(?:" PASSCHARS_CLASS "+)?"
|
||||||
#define URLPATH "(?:/[[:alnum:]\\Q-_.!~*'();/?:@&=+$,#%\\E]*)"
|
#define URLPATH "(?:/[[:alnum:]\\Q-_.!~*'();/?:@&=+$,#%\\E]*)?"
|
||||||
|
|
||||||
const char * const url_regex = SCHEME "//(?:" USERPASS "\\@)?" HOST PORT URLPATH;
|
const char * const url_regex = SCHEME "//(?:" USERPASS "\\@)?" HOST PORT URLPATH;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue