title: Anybody also epriences problems with JAXB validation, when XSD contains regular expression character class \w?
body: <p>We are using JAXB 1.0.6 (the project has started with JDK1.4 and this is the last compatible version) to create XML-Files from a XSD specification. The XSD defines an attribute "email" with the following regexp pattern.</p>
  
  <pre><code>&lt;xs:simpleType name="EmailAddress"&gt;
      &lt;xs:restriction base="xs:string"&gt;
          &lt;xs:minLength value="0"/&gt;
          &lt;xs:maxLength value="60"/&gt;
          &lt;xs:pattern value="([\w%\.\-]+@[\w%\.\-]+\.[a-zA-Z]{2,6})?"/&gt;
      &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
  </code></pre>
  
  <p>if you try to enter an email bla_bla@somewhere.com the validation will fail with the following message:</p>
  
  <pre><code>    attribute "email" has a bad value: the value does not match the 
  regular expression "([\w%\.\-]+@[\w%\.\-]+\.[a-zA-Z]{2,6})?
  </code></pre>
  
  <p>IMHO, the character class \w is equivalent to <code>[a-zA-Z0-9_]</code> </p>
  
  <p>So bla_bla@somewhere.com satisfies the expression. If you leave out the underscore the validation will pass successfully. Why is this happening?</p>
  
  <p>Regards</p>