DB<2> $re='(\d)\D*'x13 DB<3> $t="12345Y"x10 DB<4> print (join "", $t=~/$re/) 1234512345123