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?
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split with separators but dont include in the array
by Roy Johnson (Monsignor) on Oct 17, 2005 at 15:55 UTC | |
|
Re^3: split with separators but dont include in the array
by McDarren (Abbot) on Oct 17, 2005 at 15:57 UTC | |
|
Re^3: split with separators but dont include in the array
by polettix (Vicar) on Oct 17, 2005 at 23:33 UTC |