Remove the
.*
from the beginning and end of your pattern:
string val2 = "Content:'Scale['#13212']'ta";
Match match2 = Regex.Match(val2, @"'(.*)'");
if (match2.Success)
{
string value2 = match2.Value;
string GroupValue2 = match2.Groups[1].Value;
Console.WriteLine(value2);
Console.WriteLine(GroupValue2);
}
Output:
'Scale['#13212']'
Scale['#13212']