我需要在 xsd 文档定义的给定字符串字段中禁止反斜杠字符。但是,像我一样绿色,我对我的 xsd 和/或正则表达式知识没有信心。这是我到目前为止所拥有的:
<xs:simpleType name="BackslashRestrictedField">
<xs:restriction base="xs:string">
<xs:minLength value="0" />
<xs:pattern value="[^\\]"/> <!-- disallow backslash '\' char ??? -->
</xs:restriction>
</xs:simpleType>
建议?