in reply to Split at specific spaces
Or written shorter:perl -E 'say for split /\S+\s+\S+\s+\S+\K\s+/, "1 2 3 4 5 6 7 8 9"'
perl -E 'say for split /(?:\S+\K\s+){3}/, "1 2 3 4 5 6 7 8 9"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Split at specific spaces
by BrowserUk (Patriarch) on May 11, 2010 at 08:36 UTC | |
|
Re^2: Split at specific spaces
by RedElk (Hermit) on May 11, 2010 at 14:53 UTC | |
by Anonymous Monk on May 11, 2010 at 15:04 UTC |