diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-04-12 07:37:11 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-04-12 07:37:11 +0000 |
commit | 7e17831f0a03acc9a92dcc73ed525ab2e61e706f (patch) | |
tree | afe5aa997246596869303358d119fe7a9d040f29 /src/expr.c | |
parent | 79b051c610335a6a5c450ab941e51457e70e9d79 (diff) | |
download | coreutils-7e17831f0a03acc9a92dcc73ed525ab2e61e706f.tar.xz |
Clear the RE_NO_EMPTY_RANGES re syntax option, as this is a less intrusive
change from the old (Emacs) behavior, and POSIX allows us to treat [z-a]
as an empty range.
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index 0e2549f00..c5b1ae87b 100644 --- a/src/expr.c +++ b/src/expr.c @@ -424,7 +424,8 @@ docolon (VALUE *sv, VALUE *pv) re_buffer.allocated = 0; re_buffer.fastmap = fastmap; re_buffer.translate = NULL; - re_syntax_options = RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP; + re_syntax_options = + RE_SYNTAX_POSIX_BASIC & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES; errmsg = re_compile_pattern (pv->u.s, strlen (pv->u.s), &re_buffer); if (errmsg) error (EXPR_INVALID, 0, "%s", errmsg); |