How to check first name, first name and last name using regex in Java?

I get a list of names and need to check them. Some examples:

  • Elizabeth T. Bang
  • Elizabeth Bang
  • Zaki M.F. El-Adawi
  • joseph m. pastore, jr.
  • Zaki M.F. El-Adawi

How can I use regular expressions in Java to test them?

0
source share
3 answers

I would start by listing the rules that define a valid name. Just in plain English. I suspect you will end up with a very complex set of rules and exceptions. Once you have guessed that you are leaving, you will be ready to write regular expressions to match them.

+3
source

? , ? ? , , , , , , , , ASCII.

+3

QuickREx Eclipse, , Eclipse. , . , ..

+1

Source: https://habr.com/ru/post/1687035/


All Articles