I have to validate name using regex with the following conditions:
1.The Name should contain at least 1 word of length at least 3.
- If there are more than 1 word then each word should be separated by single space and should not be empty.
The first part can be done as :
[a-bA-Z]{3,}+
There are following constraints for the second one:
If there is only one word no extra space after the word should be included.
After the space there can be any number of characters.
Can anyone help me on this?