#!/usr/bin/perl "abc11ddabc11" =~ /([a-z]*)([0-9]*)dd\1\2/; print "first group \\1: $1\n"; print "second group \\2: $2\n";