Working with MatchCollection in F# November, 2009
Since the MatchCollection doesn't implement the generic IEnumerable<> so you cant use it OOB with the Seq functions. You can use the Seq.cast to convert it to a generic IEnumerable<> as follows:
open System open System.IO open System.Text.RegularExpressions let matches = Regex.Matches(File.ReadAllText("Page.html"), "(href\\s*=\\s*(['\"])(?.*?)\\2)" ) matches |> Seq.cast |> Seq.iter (fun (regMatch:Match) -> Console.WriteLine(regMatch.Value)) Console.WriteLine() Console.ReadKey() |> ignore