I have a problem. I have some text that I want to parse. The problem is I find it using regular expressions:
text = Regex.Replace(text, @"\(DOWN\)\(LShift\)(.*?)\(UP\)\(LShift\)", "$1");
I want to parse each letter from $1 value into something using my method. But the input for this method isn’t $1 variable value but a string of value "$1".
I tried:
text = Regex.Replace(text, @"\(DOWN\)\(LShift\)(.*?)\(UP\)\(LShift\)", ShiftsParser("$1"));
Look into using a MatchEvaluator. Example using a lambda: