in reply to How to extract a sentence?
Which of those steps are you stuck on?
Alternatively, skip the wheel-reinvention and use Text::Sentence or Lingua::Sentence or ...