I have a string that I need split into smaller strings with an equal length of 6. I tried using:
'abcdefghijklmnopqrstuvwxyz'.split(/(.{6})/)
But it returns an array with empty strings like so:
["", "abcdef", "", "ghijkl", "", "mnopqr", "", "stuvwx", ""]