/P{Z}* -> Matches 0 or more of anything that is not a separator (eg, space, tab, newline)
[\p{L}\p{N}] -> Matches anything that is a letter or a number
This is based on @jon-heard 's algorithm, and defines a word as anything that contains at least one letter or a number (as defined by the host language) and no spaces/tabs/etc...
Feel free to close this if it's not in line with your vision of things, but this seems to be an effective solve for #55.
This uses unicode property matching to simplify word matching (see https://javascript.info/regexp-unicode)
/P{Z}*
-> Matches 0 or more of anything that is not a separator (eg, space, tab, newline)[\p{L}\p{N}]
-> Matches anything that is a letter or a numberThis is based on @jon-heard 's algorithm, and defines a word as anything that contains at least one letter or a number (as defined by the host language) and no spaces/tabs/etc...