次の文字列を指定します。
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 ([^/]+)") を変更するにはどうすればよいですか?
前もって感謝します。