I have a string which is like
var test="clientNumber=123,TestSubject=Tom";
I need to replace Tom with Mary. Tom is entered by the user and could be anything but i need to make it Mary while processing . Also clientNumber & TestSubject could be in any order in the string.
Thanks
TestSubject=TomwithTestSubject=Mary, or do you need to replace any occurrence ofTomwithMary?,so that there is an array. Find out which one contains TestSubject and use a regex that find the string that matches that and replace it withTestSubject=Mary