I'd like to highlight long sentences (say, 50 words or greater) contained in an array of paragraph objects on a page, ie $("#content p")
. I'm not sure how to tackle this.
I originally tried to highlight all sentences, but ran in trouble when they contained HTML tags (example highlighting code on the net seem to be for individual words only, so they don't take child nodes into account). I'm aware that splitting sentences is difficult; I'd like to use .!? followed either by a space then a capital letter or nothing at all (ie the end of the paragraph).
Thanks in advance for any help/advice.