I made an XML Schema, and I have it in it.
<xs:element name="Email">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Some of my posts in one of my XML documents fail and I get this error
ElementEmail is invalid - the value " Some_Name@hotmail.com " is invalid according to its data type "String" - Template restriction failed. LineNumber: 15404 LinePostion: 32
So, just looking at all the letters sent and those that failed, I noticed that all those who failed, "_ (underline)". Therefore, I am not sure if this is the reason or not.
Edit
So, I changed my regex to
<xs:pattern value="[\w_]+([-+.'][\w_]+)*@[\w_]+([-.][\w_]+)*\.[\w_]+([-.][\w_]+)*"/>
Now it works, but does not understand why it \wdoes not capture it.