[augeas-devel] Getting pattern and checking values against regexp
David Lutterkort
dlutter at redhat.com
Thu Jul 24 19:15:52 UTC 2008
On Thu, 2008-07-24 at 20:41 +0200, Raphaël Pinson wrote:
> This would only be possible if that query is based on the
> current tree,
> since the pattern for a value can change depending on whether
> other
> nodes in the tree are present or not. For example,
>
> let lns = ([ key /u/ ] . [ key /b/ . store /[0-9]+/ ])
> | ([ key /v/ ] . [ key /b/ .
> store /[a-z]+/ ])
>
>
> Yes, I understand that problem, and I meant to use it against the
> current tree. It would not be to check in general what a field could
> contain, but in the context of the tree. Maybe my example was a bit
> vague and I could have written
>
> pattern("/files/etc/logrotate.
> d/apache2/rule[2]/file[3]")
> => /[^,# \n\t{}]+/
>
>
> Is that what you mean about using the current tree ?
Yes, that was pretty much the point I was making.
David
More information about the augeas-devel
mailing list