[augeas-devel] [PATCH 4 of 5] Escape | when turning a string into a regexp
David Lutterkort
dlutter at redhat.com
Fri May 23 17:23:34 UTC 2008
1 file changed, 1 insertion(+), 1 deletion(-)
src/regexp.c | 2 +-
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1211563026 25200
# Node ID d6def056dedee3d4f83e473dc4a20a4fb5e26b5b
# Parent 8fd276da05ac319ece57760da7ce6b21b1b04306
Escape | when turning a string into a regexp
diff -r 8fd276da05ac -r d6def056dede src/regexp.c
--- a/src/regexp.c Fri May 23 10:16:09 2008 -0700
+++ b/src/regexp.c Fri May 23 10:17:06 2008 -0700
@@ -78,7 +78,7 @@ struct regexp *make_regexp_literal(struc
if ((*t == '\\') && t[1]) {
*p++ = *t++;
*p++ = *t;
- } else if (strchr(".{}[]()+*?", *t) != NULL) {
+ } else if (strchr(".|{}[]()+*?", *t) != NULL) {
*p++ = '\\';
*p++ = *t;
} else {
More information about the augeas-devel
mailing list