fork download
  1. object Main extends App {
  2. val pattern = """(?i)(?<=\.(?<!\bst\.)(?!(?:com|org)\b))\s*+(?!$)"""
  3. val text = "here is an axample with cases like st. moris and google.com here. second sentence."
  4. val list = text.split(pattern)
  5. list.foreach(println)
  6. }
Success #stdin #stdout 0.44s 67420KB
stdin
Standard input is empty
stdout
here is an axample with cases like st. moris and google.com here.
second sentence.