0

So I've been tasked with writing a pattern detector that can recognize emails. So I need to be able to read the email names of anybody. I have the issue of reading the domain of the email, I just need to know how to read the actual name of the email. For further explanation of what I actually need to check for see bolded portion below.

randomemail88@whatever.com
bad3mai99l@hop.man.edu

This is what I have so far, and it is not working. Any help would be appreciated.

patterns.add("[.]+@[a-z]+\\.[a-z]+\\.*[a-z]*");
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563

0 Answers0