help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regular expressions and backslashes...


From: Juri Jensen
Subject: Regular expressions and backslashes...
Date: Thu, 2 Aug 2001 12:51:49 +0200
User-agent: Mutt/1.2.5i

Hi,

I've been trying to make a configuration file
that edits smb.conf (samba conf file) to my liking.

However that file contains some path names, windows
path names with backslashes. And I'm trying to escape
these backslashes as I'm using regular expressions.
Like this:

BeginGroupIfNoLineMatching 
"^[[:blank:]]*;*[[:blank:]]*logon[[:blank:]]path[[:blank:]]=[[:blank:]][\][\]%N[\]USERPROFILES[\]%U([[:blank:]]+(;.*)?)?$"
        ReplaceLineWith '   logon path = \\%N\USERPROFILES\%U ; Edited by 
cfengine'
EndGroup

As you can see from this example, I've tried to
escape them by encapsulating every instance with
square brackets as the command reference says.
I've also tried to make two instances with "[\\]".
I've even tried with backslashes (e.g. "\\\\" to
get two instances)...

But neither of them work...

Does anyone have a hint to a solution...?

-- 
Med venlig hilsen/Best regards

Juri Jensen

Xenux Aps
http://www.xenux.dk
e-mail: address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]