Instead of using “:split by ’ ':count” use ":extract with regex (Regex pattern=\b\w+\b):count " This regex finds all word boundaries followed by any number of word characters (digits too) followed by a final word boundary.
It wont be fooled by extra spaces or trailing spaces or any other exception.
Edit:
I ran a few tests and it seems like this regex will actually be fooled by special characters like @,ò,à,Ã,Š etc. Not only does it not recognise them as characters, it doest even add word boundaries around them, so cant rely on it.
Use this: livetext A’s value: trimmed: extract with regex (Regex Pattern: ‘press the spacebar here and then type in a +’):count
Thanks!
It looks like it doesn’t count words less then 3 characters as a word.
I have tried the regex - (\S+)\s* and it works great!
Thank you for showing the option of regex.