Re: rfc2822 compliant email pattern?
David Tolpin <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
> Dave,
>
> if you need a regular expression for addr-spec, then it is
>
Forgot to include quoted-pairs. This one should be better:
start=element addr-spec {
xsd:token {
pattern="""([a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+(\.[a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+)*|"([^"\\]|\\.)*")@([a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+(\.[a-zA-Z0-9!#$%&'*+\-/=?\^_`{|}~]+)*|\[([^\[\]\\]|\\.)*\])"""
}
}
David Tolpin