How to replace perfect matches string

Exapmle 1-----I have string like 152Two 560 867
i am trying to replace Two to 2 and the output will 1522 560 867
Example 2----I have string 136Three 568 875
trying to replace runtime if any string match replace with number and get output
Any idea to solve

You can get the text as below @Arun_Pondhe, then you can use string manipulations like replace to replace that particular text using switch case :slight_smile:


1 Like

You can use simple replace function.

replacedString = yourString.Replace(“One”,“1”).Replace(“Two”,“2”).Replace(“Three”,“3”)…Replace(“Nine”,“9”)

Use the above assign activity and then put all replaces until Nine as mentioned above.

Karthik Byggari


@KarthikByggari Thank you so much its too much good way

1 Like