in reply to regex assistance

Using your updated data which is now an array:-

knoppix@Microknoppix:~$ perl -Mstrict -wE ' > my @array = ( > q{GAP_SPAN09 - GAP SPAN base (Scratch Testing [TSMC11] : tsmc11_w +ld(sxfatd12j))}, > q{GAP_SPAN03 - GAP SPAN base (DFD E2E Testing [TSPAN04] : tspan04 +-dfdint-wld(sxfamd6f))}, > q{OS_WLI02 - POS_WLI02 Web Logic Integrator}, > ); > my @newArray = > map m{^(.*?)\s-\s}, > @array; > say for @newArray;' GAP_SPAN09 GAP_SPAN03 OS_WLI02 knoppix@Microknoppix:~$

I hope this is helpful.

Cheers,

JohnGG