对于这种特定格式,正则表达式将满足您的需求:
//sample created with http://regexhero.net/tester/
string strRegex = @"""(?:\d+)""";
RegexOptions myRegexOptions = RegexOptions.None;
Regex myRegex = new Regex(strRegex, myRegexOptions);
string strTargetString = @"""608"", ""840"", ""784"", ""036"", ""048"", ""124"", ""756"", ""156"", ""208"", ""978"", ""826"", ""344"", ""360"", ""376"", ""356"", ""392"", ""410"", ""414"", ""484"", ""458"", ""578"", ""554"", ""634"", ""643"", ""682"", ""752"", ""702"", ""764"", ""901"", ""840"", ""704"", ""710""";
foreach (Match myMatch in myRegex.Matches(strTargetString))
{
if (myMatch.Success)
{
//Do your stuff with the value here: myMatch.Groups[0].Value
}
}