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-
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
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
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
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
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
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'.
_
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.
_
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
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
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
11 matches
Mail list logo