I want to make a regex for matching name which can have more than one words. But at the same time I want to limit the total length to 20.
I used /\b(\w+ (\s\w+)*){1,20}\b/
.
I am getting the syntax but it is not checking word length constraint. Why?
Note: I am writing code in Javascript.