Inside the XSD file, it actually checks the pattern [! - ~] *?

I searched all over the world and have not yet found what explains the regular expression: [ !-~]* or, for that matter ([!-~]|[ ])*[!-~]([!-~]|[ ])*

I used several RegEx testers and they seem to accept all of the input. I read that XSD takes a unique RegEx form and does not accept all RegEx instructions, so it may not be a standard RegEx expression (I don't believe that it is). The only hint I have is that a type name is an for the first expression and anM for the second. I believe that to some extent this is an abbreviation for alphanumeric and alphanumeric plural, but I want to be 100% sure that it really accepts and does not make assumptions.

+4
source share
1 answer

[ !-~] matches a space or any character in the range from ! to ~ , where the range is determined by the ASCII / Unicode order. By the way ! is the first and ~ last printable ASCII character, so it will match any printable ASCII character or space.

([!-~]|[ ])*[!-~]([!-~]|[ ])* similar, but it requires one non-spatial symbol. [!-~]|[ ] same as [ !-~] .

+5
source

Source: https://habr.com/ru/post/1444124/


All Articles