#!/usr/bin/perl -w use strict; my $text = '"SECTIONS 1-2-3-4 Offered Every Performance!"'; #one way use regex match... $text =~ m/^\W*(\w+\s+\S+)/; #note doesn't modify $text #just checks for match my $x = $1; print "$x\n"; # another way without using $1 # match is in array context and we use list slice to get # the $1 match data $x = ($text =~ m/^\W*(\w+\s+\S+)/)[0]; print "$x\n"; __END__ prints ..... SECTIONS 1-2-3-4 SECTIONS 1-2-3-4