Though this is probably a duplicate, i haven't been able to make this work after reading similar questions. Looking for help please with this homework, i'm a newbie at programming.
I'm working on a program in C#
. I have a text that contains for example this sentence: "My homework version V0.90 from". I need to extract "V0.90", and that may vary from anything between V0.90 to V2.00. It is always surrounded by "My homework version "
and " from"
, i need to extract whatever is between that. This is what i've tried:
string RetRegMatch;
Match Match1 = Regex.Match(Friends[a], @"My homework version (.+) from", RegexOptions.IgnoreCase);
RetRegMatch = Match1.Value;
But i'm geeting as a result in Match1.Value
this: "My homework version V0.90 from"
, and i only want the (+.)
part to be in Match1.Value
. That is, i would like to have in Match1.Value
this: "V0.90"
. How can i do this?