in reply to Re: Possible to use "split", but save the delimiter?
in thread Possible to use "split", but save the delimiter?
my $test = qq|1-10,20 some.thing [[else]],bla bla bla|; my @temp = split /([,-\s\.\]\[]+)/, $test; use Data::Dumper; print Dumper(@temp);
1 - 10 , 20 some . thing [[ else ]], bla bla bla
[[ ]] , - \s .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Possible to use "split", but save the delimiter?
by BrowserUk (Patriarch) on Feb 10, 2010 at 17:02 UTC | |
by ultranerds (Hermit) on Feb 10, 2010 at 17:38 UTC |