help-cfengine
[Top][All Lists]
Advanced

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

Re: RegEx help


From: Mark Burgess
Subject: Re: RegEx help
Date: Sat, 26 Nov 2005 08:06:30 +0100

It is there in the SplitString function. But the problem is not the
regex but the string it is matching against.

Use of separator to make strings is simply a design flaw inherited from
the shell. It will not be repeated in cfengine 3.

M

On Fri, 2005-11-25 at 16:46 -0700, Edward F. Brown wrote:
> Looking at src/functions.c to try to understand why the 'split' character
> would matter with respect to the regex that is passed to RegCmp, it
> doesn't look like it happens within the function:
> 
> void HandleRegCmp(char *args,char *value)
> ...
> list = SplitStringAsItemList(argv[1],LISTSEPARATOR);
> ret = LocateNextItemMatching(list,argv[0]);
> 
> Why is the match affected if a character in the regex is the split
> character?  Should it be regarded as a bug?
> 
> -Ed
> 
> 
> 
> On Fri, November 25, 2005 10:52 am, Atom Powers said:
> > Thank you, that's exactly what it was.
> > But setting it as a space character won't work either, unless I change
> > the user description.
> > control:
> >   Split=(";")
> >
> > On 11/23/05, Edward F. Brown <address@hidden> wrote:
> >> On Wed, November 23, 2005 11:52 am, Atom Powers said:
> >> > I'm trying to check a user account and send an allert if it's changed.
> >> > But I'm having trouble with my RegEx; it's not matching the way it
> >> > should.
> >>
> >> Cfengine seems to be regarding those colons as a special character, its
> >> own field delimiter, or 'Split' character.  Try setting the value of
> >> 'Split' to something else:
> >>
> >> control:
> >>   Split = ( " " )
> >>
> >> -Ed
> >>
> >
> >
> > --
> > --
> > Perfection is just a word I use occasionally with mustard.
> > --Atom Powers--
> >
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

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