I have to split my sentence into many small strings with a maximum of 10 characters per string including the white spaces using Regex and Js.
let S = "Pre demo edit to 21st Century";
let strArr = s.match(/.{1,10}/g);
expected:
["Pre demo ", "edit to", "21st", "Century"]
actual:
["Pre demo e", "dit to 21s", "t Century"]