I have a free text field which can contain five words
Allowed pattern for each word is [\w+=,.@-]+
I want to add character length from 1 to 64 characters
for this I created 2 regex and using 'AND' condition but I want to create only one regex
How can I do it
a) "[\\w+=,.@-]\\s{0,1}){1,5}"
b) "\\b\\w{1,64}\\b"
Input String
Acceptable -
Test1
Test2
Test3
Test4
Test5
Acceptable - Test1 Test2 Test3 Test4 Test5
Unacceptable - Test1 Test2 Test3 Test4 Test55555555555555555555555555555555555555555555555555555555555555555
I tried this one - (^([\w\.\+\@\,]{1,64}){1}$)|(^([\w\.\+\@\,]{1,64}\s+){1,5}\s{0,1}$)
But the above required an space at the end of last word, if anyone can help with the above one so that it does not require space at end then that will fix my problem