Question
Word count question...
Hi there,
Just a quick check if the method below is suitable for getting a more accurate word count on a page?
I do have another method however, I thought I'd try a version with a RegExp.
Thanks in advance.
var theCount = 0;
var myRegExp = /\w+/;
var numOfWords = this.getPageNumWords(0);
for (var y = 0; y < numOfWords; y++) {
if(myRegExp.test(this.getPageNthWord(0,y))) {
theCount = theCount + 1;
}
}
theCount;
