simplification of ping and username regular expressions