Skip to main content
deckarduk
Inspiring
Mar 17, 2023 11:57 AM UTC
Answered

getPageNumWords - Help required please...

Hi there,

When using getPageNumWords to get the number of words on a page I can see things like ‘What and @11075446 are being treat as 2 words (I've done a test for this). The characters ' and @ are being picked up as separate words. It's the same for quite a few others, for example hyphens.

I've have a look in the JS Scripting Reference but can't see anything to stop this.

Is there a way to disregard characters like this, from getPageNumWords, as they're throwing the figures out?

Or, would I have to go through each word found and test?

Thanks in advance.

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Mar 17, 2023 12:17 PM UTC

The latter. Make sure you specify the bStrip parameter of getPageNthWord to false, though.

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Mar 17, 2023 12:17 PM UTC

The latter. Make sure you specify the bStrip parameter of getPageNthWord to false, though.

Translate
deckarduk
deckardukAuthor
Inspiring
Mar 17, 2023 12:20 PM UTC

Thanks for the speedy help Gilad 👍

Translate