I'm very new in this Regex, there's still a lot I don't understand.
I see a lot of @, but I can't find it in MSDN. What's the @ for? eg: Regex regex = new Regex("@{lalala},", RegexOptions.Compiled);
This is what I'm having trouble with. I have this string.
{BaseClass.InheritClass,Tuple.Create("MachineState",string.Empty)},
What I want to do is get the name of the InheritClass and MachineState, put it into variables.
I tried this:
Regex regex = new Regex(@"\{BaseClass.(?<inheritClassStr>\d+),Tuple.Create\(""(?<machineStateStr>\d+)"",string.Empty\)\},", RegexOptions.Compiled);
I was hoping later in the code I could do something like this:
string inheritClassString = inheritClassStr;
string machineStateString = machineStateStr;
But it doesn't work, and I do not know how to debug this. I don't know what the Regex captures, so it's very hard for me to debug.
Your help would be greatly appreciated.