Hi Balazs,
And don't forget that in YANG 1.1 you can exclude characters.
type string {
pattern ".*\n.*" { modifier invert-match; } // Disallow newline characters
pattern ".*\r.*" { modifier invert-match; } // Disallow carriage return
characters
}
/jan
> On 18 Oct 2021, at 13:24, Ladislav Lhotka <[email protected]> wrote:
>
> Hi Balazs,
>
> Unicode (if you mean it) is so convoluted that the notion of
> printable/visible characters doesn't make much sense. It is IMO much safer to
> specify character classes that you want to permit.
>
> Lada
>
> On 18. 10. 21 12:11, Balázs Lengyel wrote:
>> Hello,
>> Is there a way in YANG to restrict a string to printable or visible
>> characters? (Something like SNMP DisplayString)
>> Regards Balazs
>> --
>> Balazs Lengyel Senior Specialist
>> Ericsson Hungary Ltd.
>> Mobile: +36-70-330-7909 email: [email protected]
>> _______________________________________________
>> netmod mailing list
>> [email protected]
>> https://www.ietf.org/mailman/listinfo/netmod
>
> --
> Ladislav Lhotka
> Head, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod