fork(6) download
  1. function matchsent(text)
  2. for sent in string.gmatch(text, '[^\r\n]+%.[\r\n ]') do
  3. print(sent)
  4. print("---")
  5. end
  6. end
  7. matchsent("Some text here.\nShow me")
Success #stdin #stdout 0s 2844KB
stdin
Standard input is empty
stdout
Some text here.

---