Full string is in uppercase

Check any of string is in totally in uppercase

So you want any individual word in a length of string to be uppercase? Just want to make sure I understand your question.

  1. this is all in lower case letters

  2. this HAS one word with upper case letters

In the above 2 examples you want #1 to return false and #2 to return true, correct?

If so, then the following assign activity will work. I will assume HasUpper is a boolean variable and str1 is a string variable containing the string you want to check.

Assign HasUpper = System.Text.RegularExpressions.Regex.IsMatch(str1,“\b[A-Z]+\b”)

thanks
its correct but “APPLE REdMI” for this condition too its true

Yes, because APPLE is all uppercase. REdMI would not be caught because it is not entirely uppercase.

If you provide more context about what you want to achieve we may be better able to help

it have to match and set true, only if all the string is in uppercase “APPLE REDMI REALME”

Oh ok, this was already answered in your other post here: To check entire string is in uppercase in Uipath - #3 by Dave

@brindhaS

I hope I understood your requirement

use below code in Assign activity or message box

system.Text.RegularExpressions.Regex.IsMatch(YourInput stringvariable,“[1]+$”).ToString

or

system.Text.RegularExpressions.Regex.IsMatch(“APPLE REDMI REALME”,“[2]+$”).ToString

It returns true When all Character as Uppercase otherwise returns false


  1. ^a-z ↩︎

  2. ^a-z ↩︎

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.