public string PicUp(string val) { if (string.IsNullOrEmpty(val)) { return(val); } // 記号など除去 foreach (string exp in UseCustom == false ? ReplaceSetDefault : ReplaceSet.Where(s => string.IsNullOrWhiteSpace(s) == false)) { val = Regex.Replace(val.Trim(), exp, string.Empty); } val = val.Trim(); // 映画のタイトル抽出 foreach (string exp in UseCustom == false ? TitleSetDefault : TitleSet.Where(s => string.IsNullOrWhiteSpace(s) == false)) { Match m = Regex.Match(val, exp); if (m.Success == true) { val = m.Groups["Title"].Value.Trim(); break; } } return(val); }
public object DeepCloneObj() { var other = (PicUpTitle)MemberwiseClone(); other.ReplaceSet = ReplaceSet.ToList(); other.TitleSet = TitleSet.ToList(); return(other); }