How to check that every first letter of a data item is Uppercase?

Gary96

Member
Hi All,

How to check if every first letter of words in a data item is set to uppercase and the rest set to lowercase. ( Variable is the length of words can change in the data item)

Data item = "joHn Michael Ryan" = False

Data item = "John Micheal Ryan John" = True
 

sahil_raina_91

Active Member
Hi All,

How to check if every first letter of words in a data item is set to uppercase and the rest set to lowercase. ( Variable is the length of words can change in the data item)

Data item = "joHn Michael Ryan" = False

Data item = "John Micheal Ryan John" = True

You can use Regex to validate this :
^([A-Z][a-z]+\s*)+$
 
Last edited:

Gary96

Member
Working. How would you manipulate that Pattern to check if the second letter of the second word of the string is lowercase and all other first letters are uppercase?

John frank Micheal = True
John Frank Micheal = Flase
 
Last edited:

Gary96

Member
Working. How would you manipulate that Pattern to check if the second letter of the second word of the string is lowercase and all other first letters are uppercase?

John frank Micheal = True
John Frank Micheal = Flase

The length of the string would be 3 words.
The length of the individual characters may vary.
 

sahil_raina_91

Active Member
Working. How would you manipulate that Pattern to check if the second letter of the second word of the string is lowercase and all other first letters are uppercase?

John frank Micheal = True
John Frank Micheal = Flase

The length of the string would be 3 words.
The length of the individual characters may vary.

Something like : ^[A-Z][a-z]+\s[a-z]+\s[A-Z][a-z]+$
 
Top