Skip to content

Instantly share code, notes, and snippets.

@davidgrenier
Last active December 15, 2015 07:39
Show Gist options
  • Save davidgrenier/5224938 to your computer and use it in GitHub Desktop.
Save davidgrenier/5224938 to your computer and use it in GitHub Desktop.
open System.Text.RegularExpressions
type Clip = System.Windows.Forms.Clipboard
[<System.STAThread>]
do
Regex.Matches(Clip.GetText(), @"\d+", RegexOptions.Singleline)
|> Seq.cast<Match>
|> Seq.map (fun x -> x.Value)
|> Seq.distinct
|> String.concat ","
|> Clip.SetText
#if INTERACTIVE
let (++) a b = System.IO.Path.Combine(a, b)
let source = __SOURCE_DIRECTORY__ ++ __SOURCE_FILE__
let args = sprintf "--target:winexe %s -o:%s" source <| source.Replace("fsx", "exe")
System.Diagnostics.Process.Start(System.AppDomain.CurrentDomain.BaseDirectory ++ "fsc", args)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment