Reputation: 3240
I need to validate an input so that no "individual" word within the textbox can contain more than 3 consecutive capital letters. The following doesn't seem to be working:
[A-Z]{3,}
This is a VB application.
Thank you very much.
Upvotes: 0
Views: 61
Reputation: 7948
this pattern should do it ^(?!.*[A-Z]{4}).*
a negative lookahead that does not see 4 consecutive upper case letters
Upvotes: 2