I get the following output when I use split with regex on a string.
string = "12345678"
string.split(/(..)/)
=> ["", "12", "", "34", "", "56", "", "78"]
Why am I getting empty strings from the split method? I realize that using the scan method would give me pairs without the empty strings, but I want to know why split is giving me empty strings.