im trying to learn about regex, and how to use it braking up som logs and populating som textboxes with the results.
if i have a simple line like this
Port status: tro-S-02-av1 0/23
and want to put the tro-S-02-av1 and the 0/23 in a variable
all names wold end on av1 so the regular exspression shold be based on this.
i was thinking like this to try to get the string of tro-S-02-av1 to become the value a text box but i cant get it right, how can i do this.
Regex r;
Match m;
r = new Regex("$`\av1");
m = r.Match("Port status: tro-S-02-av1 0/23");
nodetbx.Text = m.Value;