(\W*?) # this shouldn't be necessary since whitespace should have been slurped on previous line but this shouldn't hurt either #### (\s*?) # this shouldn't be necessary since whitespace should have been slurped on previous line but this shouldn't hurt either #### my $test = '{}[]£$%'; my $match = ($test =~ m/(\W*)/)[0]; print $match; __OUTPUT__ {}[]£$%