+ 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 | alex@email.com u77 kgghhjouy bv hhj gmail.com output: alex@email.com
2 ответов
+ 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;