use strict; use warnings; use Data::Dumper; my @array=('GAP_SPAN09 - GAP SPAN base (Scratch Testing [TSMC11] : tsm +c11_wld(sxfatd12j)) GAP_SPAN03 - GAP SPAN base (DFD E2E Testing [TSPA +N04] : tspan04-dfdint-wld(sxfamd6f)) POS_WLI02 - POS_WLI02 Web Logic +Integrator'); my @newarray; while ($array[0] =~ /(\w+) - /g) { push @newarray, $1; } print Dumper(\@newarray); __END__ $VAR1 = [ 'GAP_SPAN09', 'GAP_SPAN03', 'POS_WLI02' ];
In reply to Re: regex assistance
by toolic
in thread regex assistance
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |