Skip to content

Instantly share code, notes, and snippets.

@nagat01
Created June 5, 2011 02:21
Show Gist options
  • Save nagat01/1008584 to your computer and use it in GitHub Desktop.
Save nagat01/1008584 to your computer and use it in GitHub Desktop.
$ with RegexOptions.Multiline does not work for verbatim string's end of lines
// $ with RegexOptions.Multiline does not work for verbatim string's end of lines
open System
open System.Text.RegularExpressions
let matchEndOfLineWord =
let regex = new Regex("\w+$",RegexOptions.Multiline)
regex.Matches("Yuki Nagato\nHaruhi Suzumiy\nMikuru Asahina")
|>printfn"%A"
regex.Matches(@"Kyon
Koizumi
Kunikida")
|>printfn"%A"
matchEndOfLineWord
(*
seq [Nagato; Suzumiy; Asahina]
seq [Kunikida]
*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment