fix keypair name with perl regex