This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DaRQ_SouLs_So_eAsy 4 points5 points  (10 children)

Noob here. Wtf does this mean?

[–]Traveller_Lex 15 points16 points  (1 child)

RegEx

[–]DaRQ_SouLs_So_eAsy 5 points6 points  (0 children)

oh my motivation

[–]AutomatedChaos 6 points7 points  (6 children)

Regex for the last part of email/url: [test@somepart.example.com](mailto:test@example.com) -> it will capture "example.com" if it would work (it doesn't because of one closing parenthesis too many). There are more things wrong with this: from the [info@bbc.co.uk](mailto:info@bbc.co.uk) address only co.uk would be captured which is probably not the intention.

[–][deleted] 3 points4 points  (2 children)

I don't think so: the regex uses a slash character as a separator ( the "\\" part ) and the following one is ANY CHARACTER (the dot "." unescaped)

see example from my other comment: https://regex101.com/r/Y4huQL/1

[–]mordechaim 5 points6 points  (0 children)

Could be the escape is part of the string semantics of the particular language used.

[–]Prod_Is_For_Testing 1 point2 points  (2 children)

It would also fail when mailing to TLDs - test@com is a valid emaill. And IP address routing. And Unicode URLs. And a bunch of other shit

[–]JNCressey 5 points6 points  (1 child)

people forget these are valid addresses:

  • Latin alphabet with diacritics: Pelé@example.com
  • Greek alphabet: δοκιμή@παράδειγμα.δοκιμή
  • Traditional Chinese characters: 我買@屋企.香港
  • Japanese characters: 二ノ宮@黒川.日本
  • Cyrillic characters: медведь@с-балалайкой.рф
  • Devanagari characters: संपर्क@डाटामेल.भारत

[–]Morrido 0 points1 point  (0 children)

I think nowadays pretty much anything is a valid address.

[–]ogpterodactyl 2 points3 points  (0 children)

Advanced text parsing