Hi All,
I have a text file where it has specific string “ABC” in multiple rows/places and I want to fetch that string and replace with “BCD” .
Could you please help me with the expression?
ABC
ABC
ABC
ABC
Hi All,
I have a text file where it has specific string “ABC” in multiple rows/places and I want to fetch that string and replace with “BCD” .
Could you please help me with the expression?
ABC
ABC
ABC
ABC
Thanks Prasath, I am a newbie and exploring Regex expressions how to write syntax for this expression.
First I have to find the word “AbC” and then replace with “BCD”.
Could you please help me with same?
Hi Nani Kumar
This is my default string values: I want to replace the CCC
This is my result with them changed
Use an assign
NewSTRValue = YourSTRValue.Replace(“CCC”,“CorrectValues has been changed”)
in your case it would be
NewSTRValue = yourSTRValue.Repalce(“ABC”,“BCD”)
Hi @Nani_Kumar try this code using assign activitiy
Assuming u had stored ur string in input varaible
Then use the below code
input = System.Text.RegularExpressions.Regex.Replace(input,“ABC”,“BCD”)
Regards
Nived N
Happy Automation
@Nani_Kumar
as you requested a case insensitive matching go for following (RegEx)
System.Text.RegularExpressions.Regex.Replace(YourStringVar,“ABC”,“BCD”,RegexOptions.IgnoreCase)
Help for Regex have a look here: