View Single Post
Old 01-31-2023, 05:15 AM   #495
philm
Member
philm began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jul 2022
Location: France
Device: Kobo Clara
Smile

Thank you again! Unfortunately, I don't know how to add Beautiful Soup to make a Sigil plugin, and reports doesn't count in a selection (spot every 280th).

chatGPT threw me something that partially works, except it also count words in links but it doesn't happen often in my texts: `(\b\w+\b)(?=(?:[^<>]*<[^<>]*>)*[^<>]*$)`

PS: Well, after adding some small improvements (space, parenthesis and punctuation added) it gets pretty decent: `((|\()\b\w+\b( |:|,|\)))(?=(?:[^<>]*<[^<>]*>)*[^<>]*$)` Hmm, nope, too limiting.

FYI: It misses the word " a " since it's alone and still counts some content in html tags.

Last edited by philm; 01-31-2023 at 05:18 AM.
philm is offline   Reply With Quote