It seems that the regex expressions need to encapsulated within '^' and '$' characters. This is necessary to disallow any unwanted characters at the beginning of the string and at the end of the string.
E.g. the current LegacyVersionNumberType regex (0|[1-9]\d*)(\.(0|[1-9]\d*))? allows not only for version numbers 1 or 1.0 but also for AnyString1.0, 1.0AnyString and AnyString1.0AnyString. Tests can be made e.g. here: https://regexr.com/
The required regular expression would be ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?$. I believe that this also holds for regular expressions defined in XML.
It seems that the regex expressions need to encapsulated within '^' and '$' characters. This is necessary to disallow any unwanted characters at the beginning of the string and at the end of the string.
E.g. the current LegacyVersionNumberType regex
(0|[1-9]\d*)(\.(0|[1-9]\d*))?
allows not only for version numbers1
or1.0
but also forAnyString1.0
,1.0AnyString
andAnyString1.0AnyString
. Tests can be made e.g. here: https://regexr.com/The required regular expression would be
^(0|[1-9]\d*)(\.(0|[1-9]\d*))?$
. I believe that this also holds for regular expressions defined in XML.