It looks like you've already gotten the answer you needed, and I think that Regex is the right way to go. But, just because I couldn't help myself, I wanted to see what this would require if even possible in a Blue Prism expression.
Here's what I came up with. If you needed to determine simply true or false for whether the text is formatted with the first letter as uppercase and the rest lowercase, then I think this would work in a Decision Stage. The idea is to convert the first letter to uppercase and compare it to the original, and then convert the rest of the text to lowercase and compare to the original. If no characters were changed, then we know it's in the right format:
Upper(Left([text],1))=Left([text],1) AND Lower(Right([text],Len([text])-1))=Right([text],Len([text])-1)
or
Upper(Left([text],1)) & Lower(Right([text],Len([text])-1))=Left([text],1) & Right([text],Len([text])-1)
And then if you wanted to just not even worry about it and always convert the text to the desired format, then you can use this in a Calculation Stage:
Upper(Left([text],1)) & Lower(Right([text],Len([text])-1))
I believe that both of these will work, regardless of the text that comes through and whether or not it contains numbers.
It'd be nice if we could do simple stuff like this directly in an expression using regex or whatever else, but it is possible currently even if not very nice looking.
😃
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company