正規表現 Part7
■ このスレッドは過去ログ倉庫に格納されています
0397デフォルトの名無しさん
2010/08/13(金) 21:52:21おっしゃる通りなんですけど、なんか気になるので。
>>394
一応ソースです。
//source = "山田耕筰 - 赤とんぼ"
//expression = "(?<artist>.*) - (?<title>.*?)"
Match match = expression.Match(source);
Group group;
group = match.Groups["artist"];
if (group == null)
{
artist = string.Empty;
}
else
{
artist = group.Value;
}
・・・
以下Groups["title"]、Groups["album"]について同様
■ このスレッドは過去ログ倉庫に格納されています