underwar
March 3rd, 2003, 09:01 PM
I'm writing the following statement:
string sValue = @"(r11) , ";
string res = Regex.Match(sValue, @"[^,(\s)]+(\s)*,*(\s)*", RegexOptions.Compiled).Value;
Console.WriteLine(res););
I wish to get the string "(r11)" without the comma and the spaces.
Yet I get the string "r11" without the parentheses too.
What I'm doing wrong?
string sValue = @"(r11) , ";
string res = Regex.Match(sValue, @"[^,(\s)]+(\s)*,*(\s)*", RegexOptions.Compiled).Value;
Console.WriteLine(res););
I wish to get the string "(r11)" without the comma and the spaces.
Yet I get the string "r11" without the parentheses too.
What I'm doing wrong?