}
break;
}
- if ((namedclass == OOB_NAMEDCLASS ||
- !(posixcc + skip + 2 < PL_regxend &&
- (posixcc[skip] == ':' &&
- posixcc[skip + 1] == ']'))))
- Perl_croak(aTHX_ "Character class [:%.*s:] unknown",
- t - s - 1, s + 1);
+ if (namedclass == OOB_NAMEDCLASS ||
+ posixcc[skip] != ':' ||
+ posixcc[skip+1] != ']')
+ Perl_croak(aTHX_
+ "Character class [:%.*s:] unknown",
+ t - s - 1, s + 1);
} else if (ckWARN(WARN_REGEXP) && !SIZE_ONLY)
/* [[=foo=]] and [[.foo.]] are still future. */
Perl_warner(aTHX_ WARN_REGEXP,
%.*s matches null string many times [S_regpiece]
$a = "ABC123" ; $a =~ /(?=a)*/'
- /%.127s/: Unrecognized escape \\%c passed through" [S_regatom]
+ /%.127s/: Unrecognized escape \\%c passed through [S_regatom]
$x = '\m' ; /$x/
+ Character class [:%.*s:] unknown [S_regpposixcc]
+
Character class syntax [. .] is reserved for future extensions [S_regpposixcc]
Character class syntax [= =] is reserved for future extensions [S_checkposixcc]
/[[.foo.]]/;
/[[=bar=]]/;
/[:zog:]/;
+/[[:zog:]]/;
no warnings 'regexp' ;
/[:alpha:]/;
/[.foo.]/;
/[[:alpha:]]/;
/[[.foo.]]/;
/[[=bar=]]/;
-/[:zog:]/;
BEGIN { $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3 }
/[[:zog:]]/;
+/[:zog:]/;
EXPECT
Character class syntax [: :] belongs inside character classes at - line 4.
Character class syntax [. .] belongs inside character classes at - line 5.
Character class syntax [. .] is reserved for future extensions at - line 8.
Character class syntax [= =] is reserved for future extensions at - line 9.
Character class syntax [: :] belongs inside character classes at - line 10.
-Character class [:zog:] unknown at - line 20.
+Character class [:zog:] unknown at - line 11.
########
# regcomp.c [S_regclass]
$_ = "";