Repalce string

how to exclude last word of string like 24 Months it should be 24 Month


you can use string function replace for example if var1= 24 Months then var1=var1.tostring.replace(24 Months, 24 Month) then print var1 using message box activity.

You can also use “Replace” activity.
Please find attached exampleTrimString.xaml (7.7 KB)

This solution will read a string in notepad and trim, you will have to create a notepad file like as in screenshot to test solution.

yourstring =“24 Months”
You can use - yourstring.Remove(yourstring.Length-1)

Hi @goharmalik,

Please check the solution below:

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