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?
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
In reply to Re^2: split with separators but dont include in the array
by anniyan
in thread split with separators but dont include in the array
by anniyan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |