Hello there.
This should be very simple for someone to solve.
string s = System.Text.RegularExpressions.Regex.Replace(
"King Henry Viii", "\bViii\b", "VIII");
Console.WriteLine(s);
I think the above code should write out the string "King Henry VIII"
(with capital I's), but instead it writes the original input string
unchanged. If I remove both (but not either) of the word boundary meta
characters then it works as expected. Could someone show me where I am
going wrong?
Cheers,
Mike