diff --git a/src/common/url.c b/src/common/url.c index 4966db30..c0043ba3 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -545,11 +545,12 @@ make_re (const char *grist) #define LPAR "\\(" #define RPAR "\\)" #define NOPARENS "[^() \t]*" +/* Match non-parenthesized characters individually to avoid nested repetition. */ #define PATH \ "(" \ "(" LPAR NOPARENS RPAR ")" \ "|" \ - "(" NOPARENS ")" \ + "[^() \t]" \ ")*" /* Zero or more occurrences of either of these */ \ "(?