Hello,
Let me explain. I have a string bigstring = 1234abcd4. Now i want to get all the substrings starting with 1 and ending with 4 in the bigstring.
So i wrote this code.
Regex reg = new Regex("1(.*)4"); Match matches = reg.Match(bigstring); string matchstr = matches.Groups[0].Value;
|
But i'm always getting 1234abcd4 and i want 1234 which is the first instance that matches. How can we do that?
Any ideas?
Thank you.