in reply to
Re: split with separators but dont include in the array
in thread split with separators but dont include in the array
Roy Johnson and ikegami thanks for your quick replies. Here i have one question. First i tried like the following.
@arr = split /(&&|\|\|)/, $str;
But it included && and || in the array. Then only i went for lookahead option.
But as per yours reply it works fine if i remove that extra grouping.
@arr = split /&&|\|\|/, $str;
Why is it so? Could you please explain. Then if there is many separators how to with that?
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)