Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Regex for multiline email addresses?
- johnsmith@email.com - ok
- johnsmith@email.com
- karensmith@emailcom - ok
- john smith@email.com - not ok
- karensmith@emailcom
- ((w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*(rn)?)+)r*
- ^(((w+([-+.']w+)*@w+([-.]w+)*.w+([-.]w+)*(rn)?s?)+)*)$
- /Aw+@w+.w+(nw+@w+..w+)*z/
- "test@here.plnthe@bar.pl".match(/Aw+@w+.w+(nw+@w+.w+)*z/)
- => #<MatchData "test@here.plnthe@bar.pl" 1:"nthe@bar.pl">
- "test@here.plnthebar.pl".match(/Aw+@w+.w+(nw+@w+.w+)*z/)
- => nil
- "test@here.pl".match(/Aw+@w+.w+(nw+@w+.w+)*z/)
- => #<MatchData "test@here.pl" 1:nil>
- "test@here".match(/Aw+@w+.w+(nw+@w+.w+)*z/)
- => nil
Add Comment
Please, Sign In to add comment