I want to replace question mark character ? with text Rs if ? is followed by numbers.
This is what I have tried. But not working.
string str = "DFg sdfsdaf ?145 dfgsdf ?fg";
str = str.Replace(@"\\?", "Rs");
Console.WriteLine(str);
Desired output:
DFg sdfsdaf Rs145 dfgsdf ?fg
Please help.
Try like this too:
I would recommend this read. The above pattern looks for
?and checks if it is followed bydigitone or more time then replaces?withRs.