aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-06-19 22:35:21 +0300
committerArnold D. Robbins <arnold@skeeve.com>2019-06-19 22:35:21 +0300
commit69f851227e35c5aa31f89306bf37369b3acad483 (patch)
treeb93aa0db62ab1cdad962cda0f3a34789460798de /re.c
parent50aaf2eecedf2b1fde06c99d4f49485660d18992 (diff)
downloadegawk-69f851227e35c5aa31f89306bf37369b3acad483.tar.gz
egawk-69f851227e35c5aa31f89306bf37369b3acad483.tar.bz2
egawk-69f851227e35c5aa31f89306bf37369b3acad483.zip
Fix /\{/ to not warn if --posix.
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/re.c b/re.c
index 174f54f8..210be068 100644
--- a/re.c
+++ b/re.c
@@ -107,7 +107,9 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal)
}
const char *ok_to_escape;
- if (do_traditional)
+ if (do_posix)
+ ok_to_escape = "{}()|*+?.^$\\[]/-";
+ else if (do_traditional)
ok_to_escape = "()|*+?.^$\\[]/-";
else
ok_to_escape = "<>`'BywWsS{}()|*+?.^$\\[]/-";