$re = qr[ ( the (?{ $rep = 'The' }) | quick (?{ $rep = 'Quick' }) | brown (?{ $rep = 'Brown' }) | fox (?{ $rep = 'Fox' }) ) ]x;