What is the regex pattern to match a whitespace in YANG?
Assuming that you are talking about the ‘pattern’ statement, per the specification at XML Schema Part 2: Datatypes Second Edition, \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!