From 483a58b779f2bd6c5fff64c9429a766d33e46a41 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 2 Jul 2010 15:49:42 +0300 Subject: Now at 2.03. --- regex.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'regex.h') diff --git a/regex.h b/regex.h index c9f082df..27f963f9 100644 --- a/regex.h +++ b/regex.h @@ -143,8 +143,14 @@ what you give them. Help stamp out software-hoarding! */ *, +, ? - only special when not after the beginning, (, or | */ #define RE_CONTEXT_INDEP_OPS 32 +/* 0 means that \ before a ] inside [ and ] is taken as a real \. + 1 means that such a \ escapes the following ]. This is a + special case for AWK. Other \ inside [ ] seem to work ok. */ +#define RE_AWK_CLASS_HACK 64 + /* Now define combinations of bits for the standard possibilities. */ -#define RE_SYNTAX_AWK (RE_NO_BK_PARENS | RE_NO_BK_VBAR | RE_CONTEXT_INDEP_OPS) +#define RE_SYNTAX_AWK (RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INDEP_OPS | RE_AWK_CLASS_HACK) #define RE_SYNTAX_EGREP (RE_SYNTAX_AWK | RE_NEWLINE_OR) #define RE_SYNTAX_GREP (RE_BK_PLUS_QM | RE_NEWLINE_OR) #define RE_SYNTAX_EMACS 0 -- cgit v1.2.3