in reply to regex assistance
You realize @array has only one element, the long single-quoted string?
Perhaps this:
use strict; my @array=('GAP_SPAN09 - GAP SPAN base (Scratch Testing [TSMC11] : tsm +c11 +_wld(sxfatd12j)) GAP_SPAN03 - GAP SPAN base (DFD E2E Testing [TSPAN04 +] : tspan04-dfdint-wld(sxfamd6f)) POS_WLI02 - POS_WLI02 Web Logic Int +egrator'); my @newarray = $array[0] =~ /(\S+) - /g; print "$_\n" for @newarray;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex assistance
by Anonymous Monk on Oct 20, 2010 at 13:01 UTC | |
by Utilitarian (Vicar) on Oct 20, 2010 at 13:17 UTC | |
by jwkrahn (Abbot) on Oct 20, 2010 at 18:52 UTC |