I need to search in a string and replace a certain string
Ex: Search String “Add Additional String to text box”.
Replace “Add” with “Insert”Output expected = “Insert Additional String to text box”
If you use string s=”Add Additional String to text box”.replace(“Add”,”Insert”);
Output result = “Insert Insertitional String to text box”
Have anyone got ideas to get this working to give the expected output?
Thank you!
You can use Regex to do this:
Extension method example:
Usage:
result: “Insert Additional String to text box”