I have this sample data
akb.ggb@yahoo.com should output akb ggb
sdsd.sdsd@gmail.com should output sdsd sdsd
asdasd.asasd@tmail.com should output asdasd asasd
I need a regexp to find fullname from email like above.
Any help should be appreciated.
^[^@]*will outputakb.ggbyou will then need to split by the ‘.’ character…
the regex syntax is obviously programming language dependent.
^([^\.@]+)\.*([^@]*)will in both ruby and java place in group-1 (capture-1) the first name, and in group-2 (capture-2) the surname (if it exists).You can play with regex online:
Ruby
Java