Regular Expression question
When using the Regex.Replace() method how can I change the character case?
For example, if I have some text that is all uppercase but I want to convert any XML entities such & to &
string someText = "THIS & THAT.";
// I want to change to THIS & THAT.
What is the easiest way using an expression like:
someText = Regex.Replace(someText, @"(?&\w+?;)", ${ent});
PERL scripts use a \L to lowercase the replacement text. I cannot seem to find something similar in the .NET regular expressions.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

crausch55 pointsPosted Dec 30, 2004, 6:47 AM EST