I'm using following script for splitting Unicode sentence into words array.
XRegExp.matchChain("læseWEB læser teksten på dit website op.", [XRegExp("[\\p{Alphabetic}\\p{Nd}\\{Pc}\\p{M}]+", "g")])
[ "læseWEB", "læser", "teksten", "på", "dit", "website", "op" ]
Now I'm expecting
['læseWEB ', 'læser ', 'teksten ', 'på ', 'dit ', 'website ', 'op.'].
Someone said I need to use split function instead of matchChain.
Any suggestions?