How to change upper case character to lower case character in a string

Hi All,

I need to change upper case character to lower case character in string.

I have a variable str assigned to this string value “ahuDjnTksNW”.

Now i need to change all the upper case characters to lower case characters and i have to print the particular character in a message box which i changed from upper case to lower case.

Can someone help me on this?

1 Like

@harishkesavarapu
Give a try on yourstringvar.ToLower method

1 Like

str.ToLower

Hi
hope these steps would help you resolve this
–use a assign activity like this
strinput = “ahuDjnTksNW”

now use a MATCHES activity where pass the input string as strinput and expressions as [A-Z] and get the output with a variable of type matches named out_match

–now use a FOR EACH activity and mention the above variable out_match as input
and change the type argument as System.Text.RegularExpressions.Match and inside the loop use a MESSAGE BOX activity and mention the input as
item.ToString.ToLower

Cheers @harishkesavarapu

1 Like

trying this will convert entire string to lower but i want to print the particular characters which changed from upper to lower case

Hi,

i have to print the particular character in a message box which i changed from upper case to lower case.

Can you try the following?

new String(strData.Where(function(x) Asc(x)>=65 And Asc(x)<=90).ToArray)

Regards,

For this an approach on regex Base as given by @Palaniyappan can Help

Another rough Shot can be implemented based on character Code e.g A =65, Z=90. Iterate over each character (for each, linq Statement) and detect lower Case character bY character code As @Yoichi gave you a good Starter above

1 Like

Trying this solution is displaying all the characters in message box, but i need only the characters that changed from upper to lower.

may i know the expression mentioned like if possible a screenshot of the property panel of Matches activity

Cheers @harishkesavarapu

@Palaniyappan

image

1 Like

Fine
got it
remove this condition in matches activity
image

Cheers @harishkesavarapu

This solution worked for me, thank you very much @Palaniyappan

1 Like

Cheers @harishkesavarapu

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