String replace with unknown text in it

AmitB

New member
Joined
Nov 14, 2017
Messages
4
Programming Experience
5-10
Hi,

I would like to replace the text - hello\abcd\hi

The text abcd is dynamic and I need to replace it only with xyz
I don't need to replace hello and hi and that can be left as it

How could I do that?

thanks very much
 
Call String.Replace and pass the substring to be replaced and the substring to replace it with. I'm not sure what keywords you used when you searched the web for this but it seems a fairly easy one to me.
 
Hi, thanks but the text abcd is not static. Will keep on changing. So I need to use this with some regular expression it seems
 

Latest posts

Back
Top Bottom