Apricot.Entry.GetImageUriList C# (CSharp) Method

GetImageUriList() private method

private GetImageUriList ( string text ) : List
text string
return List
        private List<Uri> GetImageUriList(string text)
        {
            List<Uri> uriList = new List<Uri>();

            for (Match match = Regex.Match(text, "img.*?src\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline); match.Success; match = match.NextMatch())
            {
                if (match.Groups[1].Value.Length > 0)
                {
                    Uri uri;

                    if (Uri.TryCreate(match.Groups[1].Value, UriKind.RelativeOrAbsolute, out uri) && !uriList.Contains(uri))
                    {
                        uriList.Add(uri);
                    }
                }
            }

            return uriList;
        }