Skip to content

Instantly share code, notes, and snippets.

@davidgrenier
Created May 23, 2012 19:40
Show Gist options
  • Save davidgrenier/2777310 to your computer and use it in GitHub Desktop.
Save davidgrenier/2777310 to your computer and use it in GitHub Desktop.
pdf
open System.Text.RegularExpressions
System.IO.File.ReadAllText @"C:\Documents and Settings\dgrenier\Desktop\PrintInternalOrderDetail.pdf"
|> (fun input -> Regex.Matches(input, @"(?s:Length (\d+).*?stream\r\n(.*?)\r\nendstream)"))
|> Seq.cast<Match>
|> Seq.map (fun m -> int m.Groups.[1].Value, m.Groups.[2].Value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment