Regarding this regex, https://github.com/vyos/vyos-1x/blob/current/interface-definitions/dns-domain-name.xml.in#L36 should not be possible to define the hostname with some special characters "_+#" ...
set system host-name 213r+21_123-# `
That means <regex> in XML definitions do not work