updated for version 7.3.1091
Problem: New regexp engine: no error when using \z1 or \z( where it does
not work.
Solution: Give an error message.
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 3699331..f8f207c 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -865,6 +865,8 @@
case '8':
case '9':
/* \z1...\z9 */
+ if (reg_do_extmatch != REX_USE)
+ EMSG_RET_FAIL(_(e_z1_not_allowed));
EMIT(NFA_ZREF1 + (no_Magic(c) - '1'));
/* No need to set nfa_has_backref, the sub-matches don't
* change when \z1 .. \z9 maches or not. */
@@ -872,6 +874,8 @@
break;
case '(':
/* \z( */
+ if (reg_do_extmatch != REX_SET)
+ EMSG_RET_FAIL(_(e_z_not_allowed));
if (nfa_reg(REG_ZPAREN) == FAIL)
return FAIL; /* cascaded error */
re_has_z = REX_SET;