I have a string, shown below
A123459922
I want to remove A and add B with Regex to the end of it. How can I do it using regex
Regex.Replace("A123459922","(\w{1})(\d*)");
I don't know exactly how can I remove the first character and Add 'B' to the end of it? to ended up something like this
123459922B
Bneeded to be added only when there's anAin the beginning? Or always regardless?A, you can also usestring.Replacewhich is faster but will also match any and allAeven the ones you might want to keep.