in reply to Re: Re: Look Behind not work, please help
in thread Look Behind not work, please help
If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter. split(/([,-])/, "1-10,20", 3); produces the list value (1, '-', 10, ',', 20)
Other interesting features of split are LIMIT, negative LIMIT, the parameter-less split, the difference between ' ', / / and /\s+/ and the implicit split to @_ when not in a list context (which is very useful in Golf).
I used one of these features in Strip leading and trailing whitespace from a string..
--
John.
|
|---|