c:\@Work\Perl>perl -wMstrict -le "$_ = 'xxqr{S}xx'; print qq{matched '$&', \$1 is '$1'} if m/qr{([0-6BS])}/; " matched 'qr{S}', $1 is 'S'