private string Variant1(string text) // the winner! { var index = -1; do { var abbreviation = _moduleInfo.GetBibleBook(text, false); if (abbreviation != null) { return(abbreviation.BibleBook.Name); } else { index = text.IndexOfAny(new char[] { ' ', ',', '.', ':', '-', '/', '\\', '>', '<', '=' }); if (index != -1) { text = text.Substring(index + 1); } } } while (index > -1); return(null); }