aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
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{}()|*+?.^$\\[]/-";