https://bugs.exim.org/show_bug.cgi?id=2673

--- Comment #5 from Petr Pisar <ppi...@redhat.com> ---
Nonetheless you have a typo in the code:

static const char pattern[] =
"^((?<scheme>[^:/?#]+):)?(?<authority>//(((?<userinfo>[^/?#]*)@)?(?<host>[^/?#:]*)(?:(?<port>[^/?#]*))?))?(?<path>[^?#]*)(\?(?<query>[^#]*))?(#(?<fragment>.*))?";
                                                                               
                                                                        ^
You need to escape the backslash because it's a special character in C string:

static const char pattern[] =
"^((?<scheme>[^:/?#]+):)?(?<authority>//(((?<userinfo>[^/?#]*)@)?(?<host>[^/?#:]*)(?:(?<port>[^/?#]*))?))?(?<path>[^?#]*)(\\?(?<query>[^#]*))?(#(?<fragment>.*))?";

Then PCRE parses the expression correctly because it will see (\?( instead of
(?(.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to