0

I tried understanding that, this is a validation for email address but i need to know what does this mean @"^(?!.)(""([^""\r\]|\[""\r\])""|" and concat-ed with @"([-a-z0-9!#$%&'+/=?^_`{|}~]|(?)(? denotes the email and concat-ed with @"@[a-z0-9][\w.-][a-z0-9].[a-z][a-z.]*[a-z]$"; denotes after the @ sign in email address but how exactly it is described in this code and can someone explain please.

string validEmailPattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|"
                + @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)"
                + @"@[a-z0-9][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$";
Sandeep
  • 85
  • 1
  • 10
  • 1
    A rough explanation is [at regex101.com](https://regex101.com/r/5HLl3n/1). Ultrapico Expresso can do it in a similar way with .NET regexps. – Wiktor Stribiżew Jul 19 '17 at 13:50
  • @WiktorStribiżew 30 seconds late :) – Jacks Jul 19 '17 at 13:50
  • 2
    Email addresses are EXTREMELY COMPLEX to validate with regex. Consequently, the contents of email regexes contain both lovecraft and witchcraft. Do not look too closely or try to understand or you may awake t̷̥̥̥̯̭̿̒̊͊̕ͅh̯̜̞̺̜̄̎͗́̀͌̒̾͝ę̶̪͙͚̣͕̙͚̤̤̃͗̈́̀͋̃̔͘ o̷̢̲̱̖͕̫͇͋̑̍̍̌̉̂͒͢͞͡n̢͓͚̘͚̩͚̐̂̀͋͌̏̎̉͜͟e̶͍̳̤͖̜̯͓̦̿͒̀̎̈́̀̎̏ w͉̙̱͓͖̺͕̹̱̓̾̐̓͛̽̐̍͘h̷̫͓̟̤͕̘̩̾̇̌̽̒͆͋̐͢͞͝o̴̮̯͓̖̫̲̮̊͑͒͋̅͝ w̢̢͈͖̺͇̖̯̿̿́̋́̐̂̕͜ą̝̦̗͙̱̗͍̍̆̄̽̏̈́̀͘̕ḯ̗͕̙͚̦̑̐̀͗̒͟͡͞t̘̣͔̩̗̹͈̪̏̌͋̄̀̐̂s̶̗̗̻̯̺̖̜͗͒̈̌̿͢͝͠ –  Jul 19 '17 at 13:51
  • It's matching an e-mail with double quotes f.e. `"a\\b\"c"@mail.com` or one without doublequotes f.e. `abcdefghijklmnopqrstuvwxyz{0123456789}!#$%&'*+/=?^_|~@a-abcdefghijklmnopqrstuvwxyz.0123456789-9.a.z`. For the double quotes email it allows certain special characters to be backslashed between the double quotes. – LukStorms Jul 19 '17 at 15:20
  • @Will I have to ask, who is t̷̥̥̥̯̭̿̒̊͊̕ͅh̯̜̞̺̜̄̎͗́̀͌̒̾͝ę̶̪͙͚̣͕̙͚̤̤̃͗̈́̀͋̃̔͘ o̷̢̲̱̖͕̫͇͋̑̍̍̌̉̂͒͢͞͡n̢͓͚̘͚̩͚̐̂̀͋͌̏̎̉͜͟e̶͍̳̤͖̜̯͓̦̿͒̀̎̈́̀̎̏ w͉̙̱͓͖̺͕̹̱̓̾̐̓͛̽̐̍͘h̷̫͓̟̤͕̘̩̾̇̌̽̒͆͋̐͢͞͝o̴̮̯͓̖̫̲̮̊͑͒͋̅͝ w̢̢͈͖̺͇̖̯̿̿́̋́̐̂̕͜ą̝̦̗͙̱̗͍̍̆̄̽̏̈́̀͘̕ḯ̗͕̙͚̦̑̐̀͗̒͟͡͞t̘̏̌͋̄̀̐̂‌​̣͔̩̗̹͈̪s̗̗̻̯͗͒̈̌̿͢͝͠‌​ ? – LukStorms Jul 19 '17 at 15:27
  • QUIET, YOU! HE'LL HEAR US! –  Jul 19 '17 at 15:30

0 Answers0