[relaxng-user] rfc2822 compliant email pattern?
Dave Pawson
dpawson at nildram.co.uk
Fri Jan 16 20:10:49 ICT 2004
At 19:35 16/01/2004, David Tolpin wrote:
Thanks David.
Much appreciated.
Boy that's a bit scary :-)
<grin/> Don't tell me, you just worked it out?
regards DaveP.
>if you need a regular expression for addr-spec, then it is
>
>start=element addr-spec {
> xsd:token {
>
>pattern="""([a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+(\.[a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+)*|"[^"\\]*")@([a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+(\.[a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+)*|\[[^\[\]\\]*\])"""
> }
>}
>
>Works for both normal addresses and forms like
>
>"David Tolpin"@[Obscure Place]
>
>The expression above is slightly more allowing than required, but should
>be appropriate
>for the majority of cases.
>
>David
>_______________________________________________
>relaxng-user mailing list
>relaxng-user at relaxng.org
>http://relaxng.org/mailman/listinfo/relaxng-user
More information about the relaxng-user
mailing list