字符串出现的字符串(如何查找并获取该特定字符串)
问题描述:
如何在字符串中获取字符串并且需要循环
how to get the string occurrence in a string and need to loop
答
试试这个:
Try this:
Regex.Matches( input, "yourString" ).Count
获取详细说明此处 [ ^ ]
另请参阅: http://msdn.microsoft.com/en-us/library/aa287734 (v = vs.71).aspx [ ^ ]