http://qs1969.pair.com?node_id=942189


in reply to help required for regexp

If your example is not a simplified case to illustrate your problem you could also use
$str =~ s/(\d)\d+/$1/g;