Gitweb:        
http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=c259135a1c09b5711243e2eecc13877826d7d61d
Commit:        c259135a1c09b5711243e2eecc13877826d7d61d
Parent:        e96c70cd760b6021ce5206af0b317ddb730a86e5
Author:        David Lutterkort <[email protected]>
AuthorDate:    Fri Oct 23 17:34:11 2009 +0200
Committer:     David Lutterkort <[email protected]>
CommitterDate: Fri Oct 23 19:04:43 2009 +0200

* src/fa.c (special_chars): treat $ and ^ as special

They are special when they are at the beginning resp. the end of a regular
expression. Making them special (i.e., escaping them with '\') everywhere
doesn't hurt.
---
 src/fa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/fa.c b/src/fa.c
index a913071..3f5b314 100644
--- a/src/fa.c
+++ b/src/fa.c
@@ -3569,7 +3569,7 @@ static int re_iter_as_string(const struct re *re, struct 
re_str *str) {
 
 static int re_as_string(const struct re *re, struct re_str *str) {
     /* Characters that must be escaped */
-    static const char * const special_chars = ".()[]{}*+?\\";
+    static const char * const special_chars = ".()[]{}*+?\\^$";
     int result = 0;
 
     switch(re->type) {

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to