From 009ccfeda269d5b353a297ca4059497343c8ce41 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 6 Dec 2012 09:20:51 -0700 Subject: [PATCH] regcomp.c:regprop: [bracketize] \w..., add \v This function returns the name of a character class given its number. This changes the name of \w, \s, \d to be [\w] .... And it adds an entry for \v and \V. These makes a complete set, and will make things easier to read, as a result of changes coming in future commits --- regcomp.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/regcomp.c b/regcomp.c index 4736bbd..6784ad3 100644 --- a/regcomp.c +++ b/regcomp.c @@ -13822,12 +13822,12 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) /* Should be synchronized with * ANYOF_ #xdefines in regcomp.h */ static const char * const anyofs[] = { - "\\w", - "\\W", - "\\s", - "\\S", - "\\d", - "\\D", + "[\\w]", + "[\\W]", + "[\\s]", + "[\\S]", + "[\\d]", + "[\\D]", "[:alnum:]", "[:^alnum:]", "[:alpha:]", @@ -13851,7 +13851,9 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) "[:space:]", "[:^space:]", "[:blank:]", - "[:^blank:]" + "[:^blank:]", + "[\\v]", + "[\\V]" }; RXi_GET_DECL(prog,progi); GET_RE_DEBUG_FLAGS_DECL; -- 2.7.4