Given the following strin开发者_如何学Gog:
someObject.SomeFunction.parameters[0] = new Thing('ValueName', 0);
How to I get just the ValueName
value? - using C#
You can use String.Substring
method or using regex:
(?<=')(?:\\'|[^'])*(?=')
e.g.:
Regex.Match(input, @"(?<=')(?:\\'|[^'])*(?=')").Value
精彩评论