my $string = 'xxxxxxabxxx'; print $1 if $string = /(x*[ab][ab]x*)/;