vijayraman has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to fetch sentences from HTML using HTML::treeBuilder. I could parse upto the div but didnt know how to write the regex for matching a sentence. Can u help me?.Thanks in advance.

Replies are listed 'Best First'.
Re: How to extract a sentence?
by hippo (Archbishop) on Jul 01, 2015 at 08:50 UTC
    1. Define a sentence.
    2. Construct an algorithm to parse text for sentences as defined above.
    3. Convert algorithm into code.

    Which of those steps are you stuck on?

    Alternatively, skip the wheel-reinvention and use Text::Sentence or Lingua::Sentence or ...

Re: How to extract a sentence?
by Anonymous Monk on Jul 01, 2015 at 08:27 UTC
    Show code, we'll fix it
      Show code, we'll fix it.
      This is probably as close to a de facto motto for Perl Monks I have ever come across.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of