Im trying to get value from string 1-1:0.0.0(123123)
Here is code
string str = "\r\n1-1:0.0.0(123123)\r\n";
string patt = @"1-1:0.0.0(\(.*?)\)\s";
Match match = Regex.Match(str, patt,RegexOptions.IgnoreCase);
string v = match.Groups[1].Value;
problem is that i dont get clear value = "(123123"
can someone explain why there is round bracket at beginning ? :/
The escaping of the parenthesis is not correct.
Change your pattern to the following (note that the backslash is in front of the first opening
():