summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index 2b71d99a40..5475d7897f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1539,6 +1539,12 @@ tryagain:
*flagp |= SIMPLE;
nextchar();
break;
+ case 'z':
+ ret = reg_node(EOS);
+ *flagp |= SIMPLE;
+ seen_zerolen++; /* Do not optimize RE away */
+ nextchar();
+ break;
case 'w':
ret = reg_node((regflags & PMf_LOCALE) ? ALNUML : ALNUM);
*flagp |= HASWIDTH|SIMPLE;
@@ -1665,6 +1671,7 @@ tryagain:
case 'A':
case 'G':
case 'Z':
+ case 'z':
case 'w':
case 'W':
case 'b':
@@ -2329,6 +2336,9 @@ regprop(SV *sv, regnode *o)
case EOL:
p = "EOL";
break;
+ case EOS:
+ p = "EOS";
+ break;
case MEOL:
p = "MEOL";
break;