my $a="command = adb asd 2t525 command=adfaf adsgadg asd "; my @t = map { "command" . $_ } grep { $_ ne "" } split /command/, $a; print @t;
In reply to Re: split but preserve the matching pattern
by friedo
in thread split but preserve the matching pattern
by nwkcmk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |