0

I'm dealing with some email parsing and validation and I'm wondering if a valid email address can contain a newline character.

Awesome-o
  • 2,002
  • 1
  • 26
  • 38
  • Does this answer your question? [How to validate an email address using a regular expression?](https://stackoverflow.com/questions/201323/how-to-validate-an-email-address-using-a-regular-expression) – lenik Apr 09 '20 at 02:05

1 Answers1

0

There's no way for e-mail address to contain a newline. This should help: How to validate an email address using a regular expression?

Here's a diagram, note there's no 0x0a character anywhere: enter image description here

lenik
  • 23,228
  • 4
  • 34
  • 43
  • According to this https://github.com/jackbearheart/email-addresses/issues/36#issuecomment-366471840 ` \r\n ` is allowed. From many of the answers in your link I'm also seeing `CRLF`. Can you provide more context? – Awesome-o Jun 03 '20 at 06:48
  • @Awesome-o the URL I have provided referring numerous RFC documents. Please, use them instead of someone's github page that has absolutely no authority. – lenik Jun 03 '20 at 07:14
  • to reiterate, an answer in the exact link you provided mentions `CRLF` which is found here https://stackoverflow.com/a/14075810/1979235 . Furthermore, RFC 5322 has 72 matches of the string `CRLF`, but no mention of your diagram. So without an explanation of why these `CRLF`'s exist I can't accept your answer as correct. – Awesome-o Jun 04 '20 at 00:06