summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regcomp.c b/regcomp.c
index edab543e42..0d6d344970 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -13864,6 +13864,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
const char *s = RExC_parse;
const char c = *s++;
+ if (*s == '^') {
+ s++;
+ }
while (isWORDCHAR(*s))
s++;
if (*s && c == *s && s[1] == ']') {