Hello,
I have a regex and I want to modify the value of a named capture
before doing the regex.Replace.
So something like:
string text = Regex.Replace(oldText, myRegex, @"<a href="$1">$1</a>",
regexOptions);
Now I want to modify the value of the second $1 just in case it is too
long to display.
This doesn't work, but this is what I want to do somehow!
string text = Regex.Replace(oldText, myRegex,
String.Format(@"<a href="$1">{0}</a>",
MyFunction("$1")),
regexOptions);