Cfengine Help: Re: regex help

2011-05-05 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21779#msg-21779 Thank you for the lengthy explanation. I'll have to chew on this for a bit. ___ Help-cfengine mailing list Help-

Cfengine Help: Re: regex help

2011-05-04 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21705,21776#msg-21776 Yes, I'm saying put a .* at the end. :) To handle the zero-width look-arounds, imagine that there's an index which keeps track of which character you're at in the

Cfengine Help: Re: regex help

2011-05-04 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21764#msg-21764 Sauer, Are you suggesting that the regex be this: (\S+\s+){5}(?&1 > /dev/null).* If I understand this correctly then the look arounds need a contingency m

Cfengine Help: Re: regex help

2011-05-03 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21705,21762#msg-21762 neilhwatson Wrote: --- > I removed :? from the expression but still no > matches. Sorry - I wasn't paying atten

Cfengine Help: Re: regex help

2011-05-02 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21721#msg-21721 I removed :? from the expression but still no matches. ___ Help-cfengine mailing list Help-cfengine@cfengine.org

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21705,21719#msg-21719 neilhwatson Wrote: --- > To make matters more interesting cfengine.com's > regex tester says the regex is OK but

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21718#msg-21718 To make matters more interesting cfengine.com's regex tester says the regex is OK but for edit files and processes it shows 'undefined error'. _

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21717#msg-21717 That hurts my brain. I get an expected match with PCREgrep now. Still Cf does not delete the line. Strange. _

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21705,21716#msg-21716 neilhwatson Wrote: --- > I'm very confused now. PCREgrep matches both > lines. You're right. I was testing wi

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,21705,21715#msg-21715 I'm very confused now. PCREgrep matches both lines. # /var/cfengine/bin/pcregrep '(:?\S+\s+){5}(?&1 > /dev/null)' /home/nwatson/crontab 01 3 1 * * /usr/scri

Cfengine Help: Re: regex help

2011-04-29 Thread no-reply
Forum: Cfengine Help Subject: Re: regex help Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21705,21713#msg-21713 The negative lookbehind is zero-width, so you need the rest of the pattern around it to match a complete line if the zero-width piece was removed. That's the har