From the following string shown replace “e” just before 2023 to “”.
I dont want to replace any other e
Store the data in a variable called Input. Then use the below expression to replace e.
- Assign -> Output = System.Text.RegularExpressions.Regex.Replace(Input.toString, "e(?=2023)", "")
Hope it helps!!
You can check the below workflow for better understanding… @BHUSHAN_NAGAONKAR1
Hope you understand!!
Thankyou for your quick response.
It’s my pleasure… @BHUSHAN_NAGAONKAR1
Happy Automation!!
Just an addition to this what if I have to replace using character index. Such as the position of might 5 or 6 depending. How will I do it?
If you have the Input as 12345e6 you want to replace the e with empty, then you can use the Substring function,
Check the below expression,
- Assign -> Input = "12345e6"
- Assign -> Output = Input.Replace(Input.Substring(5,1),"")
Check the below workflow,
Hope you understand!!
Thankyou for your prompt response. Understood and worked as well
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.