Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 1
Write a program which separates emails from other characters.
Imagine there is a long list of usernames,emails and passwords.Write a program which output will be only the emails '@' sign. ex. input:alex || gismo4l3x | [email protected] u77 kgghhjouy bv hhj gmail.com output: [email protected]
2 Answers
+ 2
https://code.sololearn.com/c0aVkAA025LU/?ref=app
Did it in 1 line
+ 1
This is often done with regex: an example I found on stack overflow
var re = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;