I need a tokenizer that sets a string with an arbitrary space between words, creates an array of words without empty substrings.
For example, if a string is specified:
" I dont know what you mean by glory Alice said."
I use:
str2.split(" ")
This also returns empty substrings:
["", "I", "dont", "know", "what", "you", "mean", "by", "glory", "", "Alice", "said."]
How to filter empty lines from an array?
javascript tokenize
dokondr
source share