When I use a grouped expression in the regex in String.split, it results in keeping the separators in the result, without it the separators are lost. Is this an undocumented feature, or something I can rely on?
console.log('The quick brown fox jumped over the lazy dog.'.split(/h/g))
console.log('The quick brown fox jumped over the lazy dog.'.split(/(h)/g))