class Rake::Task
def first_sentence(string)
by the first period, exclamation mark, or the end of the line.
Get the first sentence in a string. The sentence is terminated
def first_sentence(string) string.split(/(?<=\w)(\.|!)[ \t]|(\.$|!)|\n/).first end