Regex for name validation with posix regex

2

I have a function in c++ that validates first and last name with the following regex :

"((?:[á-úA-Za-z]+[ ]+[á-úA-Za-z]{0,20})?)?"

I was taking a look at letting you learn how to create regex otherwise based on what's here on this site:

link

So I did this:

"((?:[[:alpha:]]+[[:space:]]+[[:alpha:]]{0,20})?)?"

But names such as Cesar and Tiao does not validate how I do it based on this type of regex ?

    
asked by anonymous 28.01.2018 / 13:29

0 answers