I have a string like:
string originalStringBefore = "http://www.abc.com?a=||ThisIsForRndNumber||&qq=hello&jj=||ThisIsForRndNumberAlso||";
I want every string which comes between || to be replaced with a random number.
Now, the random number generation is easy, but i can’t find the way to write a Regular expression to search the string using a pattern and replace it.
I don’t want to do it by string manipulation functions.
Expected Solution/ outcome:
string originalStringAfter = "http://www.abc.com?a=||254877787||&qq=hello&jj=||6594741454||";
1 Answer