Christian Hopps <[email protected]> wrote:
>
> Martin Bjorklund <[email protected]> writes:
>
> > Hi,
> >
> > Just some quick comments on the YANG:
> >
> > However, it seems libxml2's regexp engine requires both "[" and "^" to
> > be escaped:
> >
> > '[-0-9a-z "#\[\]' +
> > '!$%&()*+,./:;<=>?@\\\^_`{|}~]+';
> >
> > This expression isn't wrong, but it seems to me that these characters
> > should not have to be escaped.
> >
> > The pattern allows double quote (") but not single quote ('). Is
> > that intentional?
>
> The intent was "ascii-printable". Would be nice if there was an easier
> way to specify this. :)
Hmm, one pattern includes space (but not tab etc), and another doesn't
include space. Was that intentional?
You may be able to use Unicode properties and write something like:
pattern '[\p{IsBasicLatin}-[\p{Lu}\p{Cc}\p{Z}]]+';
Lu = uppercase letter
Cc = ascii control
Z = whitespace
> > [a simple way to test the patterns is to have a "default" statement
> > and a YANG complier that verifies defaults]
>
> Does pyang do this?
Yes.
/martin
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod