阅读背景:

如何从字符串中提取格式化部分

来源:互联网 

How does one extract only the formatting part from a string. For example: if I have a string = "Warning: the error {0} has occurred. {1, 9} module has {2:0%} done." I would like to extract {0}, {1,9} and {2:0%} out into a sting array. Is there a regular expression or something that can be done other than my way of looping the string with Substring indexof '{' and '}' alternately?How does one extract only the formatting part f




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: