in reply to Re^2: split with separators but dont include in the array
in thread split with separators but dont include in the array
But it included && and || in the array.@arr = split /(&&|\|\|)/, $str;
That would split the string on any occurrences of "foo", "bar" or "meh" without including them in the resultant list.@arr = split /foo|bar|meh/, $str;
|
|---|