Correct fix for experimental POSIX pattern translation.

This commit is contained in:
Philip.Hazel 2017-05-10 15:42:13 +00:00
parent 7ca875b1db
commit 3813b518ce
3 changed files with 11 additions and 8 deletions

View File

@ -279,12 +279,15 @@ while (plength > 0)
/* Fall through */
case CHAR_ASTERISK:
case CHAR_DOT:
case CHAR_CIRCUMFLEX_ACCENT:
case CHAR_DOLLAR_SIGN:
if (p + 1 > endp) return PCRE2_ERROR_NOMEMORY;
*p++ = sc;
break;
default:
if (c < 256 && strchr("\\{}?*+[]()|", c) != NULL)
if (c < 256 && strchr("\\{}?*+[]()|.^$", c) != NULL)
{
PUTCHARS(STR_BACKSLASH);
}

View File

@ -257,9 +257,9 @@
\= Expect no match
a1b
/how.to/
/how.to how\.to/
/^how to/
/^how to \^how to/
#pattern convert=unset

View File

@ -411,11 +411,11 @@ a*b\+c+[def]\(ab\)(cd)
a1b
No match
/how.to/
how.to
/how.to how\.to/
how.to how\.to
/^how to/
^how to
/^how to \^how to/
^how to \^how to
#pattern convert=unset