If the PATTERN contains parentheses, additional array elements are created from each matching substring in the delimiter. split(/([,-])/, "1-10,20", 3); produces the list value (1, '-', 10, ',', 20) #### ('', 12, '', 34, '', 56, '')