$str =~ s/(\d)\d+/$1/g; [download]
In reply to Re: help required for regexp by si_lence in thread help required for regexp by upaksh