[Top][All Lists]

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

Re: Regular expressions and backslashes...

From: Adrian Phillips
Subject: Re: Regular expressions and backslashes...
Date: 02 Aug 2001 15:58:49 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

>>>>> "Juri" == Juri Jensen <address@hidden> writes:

[Don't forget to copy to the list so its in the archives]


[ why using [[:blank:]] ]
    Juri> No, but I'm not that good at regular expressions. Are there
    Juri> any other way that I could achieve the same result...?

Just write it  :-

BeginGroupIfNoLineMatching "^ *;* *logon path = [\][\]%N[\]USERPROFILES[\]%U( 

    >> - there could be several spaces around the =

    Juri> There isn't...

In your case perhaps, I just meant in general smb.conf can have
multiple spaces and it is normally better to be flexible to begin

    >> - have you a copy of the line which this should match

    Juri> Yes:

    Juri>    logon path = \\%N\USERPROFILES\%U ; Edited by cfengine

Oh, as in the one you are replacing it with :-)

Right, I've been testing this with perl and having lots of fun. Yes,
it is the backslashes. Using [\] gives problems because \] is just an
escaped ] possibly. I've tried various variations and I'm currently
stumped although you could try [\\] to see if that helps.

Stop the press !! I got it working using :-

^ *;* *logon path = [\\][\\]%N[\\]USERPROFILES[\\]%U( +(;.*)?)?$

Try that and let me know if it works as it works using perl at least
but I haven't checked with cfengine



Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]

reply via email to

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