Yang regex spaces

What is the regex pattern to match a whitespace in YANG?

Assuming that you are talking about the ‘pattern’ statement, per the specification at https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs, \s is equivalent to the character class [#x20\t\n\r] (i.e. ascii space, tab, newline, carriage return) - i.e. the same as in Perl regexps, I believe. Whether you really want to allow all of those in your leaf values is perhaps worth consideration - if you only want to allow the space character, it can be matched by - a space character!:slight_smile: