If you are only interested in the first part, use
var a = fulltext.match(/^.{47}\w*/)
See the demo (fiddle) here .
If you want to split the entire string into several substrings, use
var a = fulltext.match(/.{47}\w*|.*/g);
See demo (violin) here .
... and if you want substrings not to start with a word delimiter (like a space or a comma) and prefer to include it with the previous match, use
var a = fulltext.match(/.{47}\w*\W*|.*/g);
See demo (violin) here .
Ξ©mega
source share