给定以下字符串:
string = @"
/SQL "\Geneva\GenevaAfterTaxExtracts" /SERVER SMAMSQL2602A /CHECKPOINTING OFF
/SET "\Package.Variables[User::Portfolio].Properties[Value]";"2504,2505,2506,2507,336,339,340,343,344,345,346,348,349,350"
/SET "\Package.Variables[User::FirstMonthEnd].Properties[Value]";"8/31/2013"
/SET "\Package.Variables[User::LastMonthEnd].Properties[Value]";"8/31/2013"
/SET "\Package.Variables[User::Files].Properties[Value]";"Valuations" /REPORTING E"
我想匹配和 nextMatch 如下:
/SET "\Package.Variables[User::Portfolio].Properties[Value]";"2504,2505,2506,2507,336,339,340,343,344,345,346,348,349,350"
/SET "\Package.Variables[User::FirstMonthEnd].Properties[Value]";"8/31/2013"
/SET "\Package.Variables[User::LastMonthEnd].Properties[Value]";"8/31/2013"
/SET "\Package.Variables[User::Files].Properties[Value]";"Valuations"
我正在使用以下内容:
Regex re = new Regex(@"\/SET ([^\/]+)");
Match match = re.Match(command);
第一个和最后一个工作正常,但日期在“/”之前被截断,如下所示
/SET "\Package.Variables[User::FirstMonthEnd].Properties[Value]";"8
/SET "\Package.Variables[User::LastMonthEnd].Properties[Value]";"8
如何更改 Regex(@"/SET ([^/]+)") 使其在日期上也匹配?
提前致谢。