How to properly escape Regular Expression pattern in XSD schema?
问题 I need to fulfill a requirement to only accept values in the form of MM/DD/YYYY. From what I've read on: https://www.w3.org/TR/xmlschema11-2/#nt-dateRep Using <xs:simpleType name="DATE"> <xs:restriction base="xs:date"/> </xs:simpleType> Is not going to work as its regex apparently is not supporting this format. I have found and adjusted this format: ^(?:(?:(?:0?[13578]|1[02])(\/)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:0?2(\/)29\3(?:(?:(?:1[6-9]|[2-9]\d)